LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   preserve file ownership with the "zip" command? (https://www.linuxquestions.org/questions/linux-general-1/preserve-file-ownership-with-the-zip-command-259345/)

zovres 11-25-2004 08:33 PM

preserve file ownership with the "zip" command?
 
Reading the man pages, I have been able to preserve the permissions but not the ownership.

anyone has an idea? or a suggestion for an alternative to "zip"?

thx :)

hutuworm 11-25-2004 08:53 PM

You may try gzip or bzip2.

whansard 11-25-2004 09:01 PM

tar has an extract option --same-owner, so that if you used tar with the compression program of your choice, you can keep the ownership the same.
when extracting
tar zxvpf filename.tar.gz --same-owner


edit: great. i didn't even realize that gzip and bzip2 kept ownership by default.


All times are GMT -5. The time now is 05:41 PM.