![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| "include" directory is not there | Katkota | UNIX for Dummies Questions & Answers | 10 | 01-01-2008 09:07 PM |
| include all files under a directory | fredao | Shell Programming and Scripting | 4 | 12-15-2006 09:25 PM |
| date information of a directory | gfhgfnhhn | UNIX for Dummies Questions & Answers | 1 | 06-29-2006 05:37 AM |
| #include? | yongho | UNIX for Dummies Questions & Answers | 1 | 08-01-2005 11:55 AM |
| File/directory information...... | Makaveli.2003 | UNIX for Dummies Questions & Answers | 50 | 02-26-2002 09:02 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
hi,
say I have dirA/file1 dirB/file2 and I tar them up, and then do Code:
zcat Tar.tar | tar tvf - dirA/ dirA/file1 dirB/ dirB/file2 yet other times I will see dirA/file1 dirB/file2 i.e. no directory stuff Why is this? thanks |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
tar has evolved over the years. The very first versions of tar did not copy directory information into the archive. The feeling was that if a directory was needed, just create it on the fly. But this lost directory ownership and permission info so it was fixed. A few current versions of tar has options to create an archive in this manner for compatibility with very old tar versions.
The way you phrase the question suggests that you thing omitting directories from a tar archive is normal or good. This is not the case. |
|
#3
|
|||
|
|||
|
yes, but say I want to tar up
a/b/c/d/file1 x/y/z/file2 then if directory information is stored I will have a/ a/b/ a/b/c/ a/b/c/d/ a/b/c/d/file1 x/ x/y/ x/y/z/ z/y/z/file2 Also, if I want to untar this and I already have these directories created on my system, then these new directory information will overwrite my directory information? thanks |
|
#4
|
||||
|
||||
|
It should if you run it as root. Generally only root can give files away. Also if tar sets a directory to read-only, root can still put files in it. This is what tar usable to backup and restore files.
|
|
#5
|
|||
|
|||
|
thanks
|
|||
| Google The UNIX and Linux Forums |
| Tags |
| tar |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|