Pip*_*pin 16
你能试一下吗:
tar -pcvzf xxx.tar.gz
Run Code Online (Sandbox Code Playgroud)
p ==保留权限
c == create archive
v == verbose(在制作tar时打印名称)
z == gzip
f == tar文件名
仔细查看联机帮助页可以澄清您的问题:
-p, --preserve-permissions, --same-permissions
extract information about file permissions (default for superuser)
Run Code Online (Sandbox Code Playgroud)
但是请注意,在FAT等某些文件系统上解析您的存档不会保留权限,因为它们不支持它.
此外,数字所有者/访问时间保留可能会让您感兴趣:
--numeric-owner
always use numbers for user/group names
--atime-preserve
preserve access times on dumped files, either by restoring the
times
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
18353 次 |
最近记录: |