本文介绍了tar为什么不保留文件权限?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我注意到在一个Linux上创建的tarball在另一个Linux上解压缩时不会保留文件权限.

I have noticed that a tarball created on one linux does not preserve the file permissions when extracted on another linux.

如何使tar保留文件权限?

How can I make tar preserve the file permissions?

推荐答案

在创建压缩包和解压缩包时都使用 p 选项.

Use the p option, both when creating the tarball and when extracting it.

这篇关于tar为什么不保留文件权限?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-30 15:42