LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-20-2005, 01:22 PM   #1
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Rep: Reputation: 30
TAR newbie question


I'm looking to tar up a directory structure (tons of files and subdirectories), and have it keep the file permissions (owner, group, group ID's etc).

What's the proper switch for this? Thanks!
 
Old 10-20-2005, 01:43 PM   #2
Peingune
Member
 
Registered: Oct 2002
Location: Ill
Distribution: Gentoo x86 2006.0
Posts: 89

Rep: Reputation: 16
seven,

you can man tar and it will tell you how to tar up a directory. I do believe it's -d but man tar will help you greatly.
 
Old 10-20-2005, 02:01 PM   #3
Seventh
Member
 
Registered: Dec 2003
Location: Boston, MA
Distribution: Redhat / Debian
Posts: 269

Original Poster
Rep: Reputation: 30
:\ Was hoping for a bit more than RTFM, but thanks all the same.
 
Old 10-20-2005, 02:46 PM   #4
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
There is no switch to store file permissions as tar stores the permissions anyway.

However, you need to explicitly tell it to preserve permissions when *extracting*.

The switch for this is prominently displayed in the man page. If you're not prepared to rtfm when necessary, then why are you using Linux?
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i decompress this tar.tar file? hmmm sounds new.. tar.tar.. help ;) kublador Linux - Software 14 10-25-2016 02:48 AM
a tough question 4 u, problem in extracting tar & tar.gz files p_garg Linux - General 5 11-08-2010 11:02 AM
Really really newbie question about installing packages with tar.gz. Ardor Linux - General 11 09-18-2005 07:49 PM
Diferance between rpm, tar, tar.gz, scr.tar, etc mobassir Linux - General 12 08-21-2003 06:30 AM
tar.gz question <---NOOOOOB QUESTION jairo Linux - Software 4 02-17-2003 05:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:48 PM.

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