tar: preserving only file names, contents and executable bit

拥有回忆 提交于 2019-12-11 04:39:01

问题


I want to use tar to preserve only file names, file contents, and the executable bit for the owner (and ignore the executable bit for group and other). The command I have come up with is

tar -cf <name>.tar --numeric-owner --owner=0 --group=0 --mode="go-rwx,u-rw" <files>

I would like the output <name>.tar not to change unless I change the file name, file contents, or owner's executable bit in one or more of <files>. Assume that the <files> are in sorted order by name.

Will the command that I have written do that?

来源:https://stackoverflow.com/questions/45734702/tar-preserving-only-file-names-contents-and-executable-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!