[英]-C option in tar changes parent directory permission
related to Tar without retaining directory and tar creation without directory to be retain 与不保留目录的Tar和不保留目录的 tar创建有关
Hi All, 大家好,
Thanks for making understand -C use to create a tar(tar -cf a/b/c/tarfile.tar -C a/b/c .) without retaining directory structure. 感谢您理解-C在不保留目录结构的情况下用于创建tar(tar -cf a / b / c / tarfile.tar -C a / b / c)。
But when i un-tar its changing parent directory permission. 但是当我解压缩它更改的父目录权限时。 Please help me understanding more about it.
请帮助我更多地了解它。 It should not change parent directory permission while extracting tar(tar -xvf).
提取tar(tar -xvf)时,不应更改父目录权限。
The command 命令
tar -cf a/b/c/tarfile.tar -C a/b/c .
has an entry for .
的条目
.
(the directory which you are tarring). (您要归档的目录)。 When you extract the tar, that directory's permissions apply.
提取tar时, 将应用该目录的权限。 If you do not want this behavior, you can either
如果您不希望出现这种情况,则可以
tar -cf a/b/c/tarfile.tar -C a/b/c foo
tar -cf a/b/c/tarfile.tar -C a/b/c foo
tar tvf
using your tarfile as the parameter. tar tvf
查看可用的内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.