FutureQuest, Inc. FutureQuest, Inc. FutureQuest, Inc.

FutureQuest, Inc.
Go Back   FutureQuest Community > General Site Owner Support (All may read/respond) > General Coding/Development
User Name
Password  Lost PW

Reply
 
Thread Tools Search this Thread Display Modes
Old 05-02-2006, 11:12 AM   Postid: 147926
Benj
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jun 1999
Posts: 391
Best tar command to preserve file permissions ?

Hi,
what is tar command that I should use to uncompress a xxx.tar.gz file to directory ABC, while preserving all files and directory permissions and such ?

Cordially,
Benj
Benj is offline   Reply With Quote
Old 05-02-2006, 11:13 AM   Postid: 147927
 Kevin
Systems Administrator
 
Kevin's Avatar
 
Join Date: Aug 2001
Location: Orlando, FL
Posts: 2,560
Re: Best tar command to preserve file permissions ?

Try: tar -pcvzf xxx.tar.gz ABC
__________________
Kevin
Kevin is offline   Reply With Quote
Old 05-02-2006, 11:14 AM   Postid: 147928
hobbes
Have you hugged a tiger today?
 
hobbes's Avatar

Forum Notability:
1238 pts: A True Crowd-pleaser!
[Post Feedback]
 
Join Date: Mar 2000
Location: Third Sol Planet Posts: Far too many. Oh ok -
Posts: 2,721
Re: Best tar command to preserve file permissions ?

Might want to switch the 'c' flag to an 'x' to extract (uncompress)
hobbes is offline   Reply With Quote
Old 05-02-2006, 11:15 AM   Postid: 147929
 Kevin
Systems Administrator
 
Kevin's Avatar
 
Join Date: Aug 2001
Location: Orlando, FL
Posts: 2,560
Re: Best tar command to preserve file permissions ?

p == preserve permissions
c == create archive
v == verbose (print names while making tar)
z == gzip
f == tar file name
__________________
Kevin
Kevin is offline   Reply With Quote
Old 05-02-2006, 11:16 AM   Postid: 147930
Benj
Registered User

Forum Notability:
10 pts: User-friendly
[Post Feedback]
 
Join Date: Jun 1999
Posts: 391
Re: Best tar command to preserve file permissions ?

How fast answers thanks.

so I should use:

tar -pXvzf xxx.tar.gz ABC

...

Cordially,
Benj
Benj is offline   Reply With Quote
Old 05-02-2006, 11:17 AM   Postid: 147931
hobbes
Have you hugged a tiger today?
 
hobbes's Avatar

Forum Notability:
1238 pts: A True Crowd-pleaser!
[Post Feedback]
 
Join Date: Mar 2000
Location: Third Sol Planet Posts: Far too many. Oh ok -
Posts: 2,721
Re: Best tar command to preserve file permissions ?

lower case x
hobbes is offline   Reply With Quote
Old 05-02-2006, 11:17 AM   Postid: 147932
 Kevin
Systems Administrator
 
Kevin's Avatar
 
Join Date: Aug 2001
Location: Orlando, FL
Posts: 2,560
Re: Best tar command to preserve file permissions ?

When extracting you could just use: tar -pxvzf xxx.tar.gz
You would only need the last param if you only want to extract ABC from a tarball that also contains other things.
__________________
Kevin
Kevin is offline   Reply With Quote
Old 05-02-2006, 11:18 AM   Postid: 147933
hobbes
Have you hugged a tiger today?
 
hobbes's Avatar

Forum Notability:
1238 pts: A True Crowd-pleaser!
[Post Feedback]
 
Join Date: Mar 2000
Location: Third Sol Planet Posts: Far too many. Oh ok -
Posts: 2,721
Re: Best tar command to preserve file permissions ?

Hey Kev, don't you have an email about a crontab to answer

-- never mind, Bob got it
hobbes is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 visitors)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 11:37 PM.


Running on vBulletin®
Copyright © 2000 - 2014, Jelsoft Enterprises Ltd.
Hosted & Administrated by FutureQuest, Inc.
Images & content copyright © 1998-2014 FutureQuest, Inc.
FutureQuest, Inc.