Did you know LQ has a Linux Hardware Compatibility List?
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 11-25-2004, 09:33 PM   #1
Registered: Sep 2002
Posts: 184

Rep: Reputation: 30
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"?

Old 11-25-2004, 09:53 PM   #2
Registered: Aug 2004
Posts: 130

Rep: Reputation: 15
You may try gzip or bzip2.
Old 11-25-2004, 10:01 PM   #3
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix, 98,2000 + various
Posts: 3,172

Rep: Reputation: 52
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.

Last edited by whansard; 11-25-2004 at 10:03 PM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in man command "sh: line 1: /usr/bin/gtbl: No such file or directory" MinA Slackware 1 09-06-2004 07:36 PM
Tiny Sofa 2.0 - I thought "halt", "reboot" were only root command ?? sorcerer Linux - Distributions 1 08-21-2004 04:28 PM
Why doesn't "cp -p <file>" copy <file> and preserve ownership? davidas Linux - Newbie 5 04-12-2004 06:44 AM
"how do I extract a number from a text file using shell command?" sdandeker Linux - Networking 3 02-12-2004 09:54 AM
qmail: strange output of "file" command slowleak Linux - Security 1 08-10-2001 11:40 PM

All times are GMT -5. The time now is 05:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration