Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Using tar to archive files



On Wed, 7 Mar 2007, Dave M G wrote:

tar -cvzf archive.tgz -C directory . --exclude directory/subdir

That puts all the files inside the archive underneath a directory named ".".

Which should be fine; "." means the current directory. However, if you really want to get rid of that, you could try

    (cd /someplace; tar -cvzf /somewhere-else/archive.tgz .* *)

It looks to me like the default behavior is for empty directories to not be included in the archive. When I create an archive then view it with the Archive Manager application, they don't seem to be there.

I've never seen a tar that doesn't store the empty directories. Are you sure it's not your archive manager that's not displaying them? What does "tar tvzf archive.tgz" say?

cjs
--
Curt Sampson       <cjs@??>        +81 90 7737 2974


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links