Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Using tar to archive files
- Date: Wed, 07 Mar 2007 13:32:09 +0100
- From: Sigurd Urdahl <sigurdur@??>
- Subject: Re: [tlug] Using tar to archive files
- References: <45EE48F8.9050506@example.com> <b4d277190703062221l2d4eb0d6ue662e8621fc89fa9@example.com> <45EE67C5.4080002@example.com>
- User-agent: Icedove 1.5.0.9 (X11/20061220)
Dave M G wrote:Edmund,
Thank you for replying.Maybe something like this would work? tar -cvzf archive.tgz -C directory . --exclude directory/subdir
That puts all the files inside the archive underneath a directory named ".".
Not sure I understood the bit about empty directories, so I can't help you with that, I'm afraid...
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.
Hmm, I don't seem to have trouble with empty directories at all (Debian Etch). With the following directory structure:
sigurdur@??:/tmp$ tree test/ test/ `-- web |-- empty |-- empty2 |-- exclude | |-- 1 | |-- 2 | `-- 3 |-- non-empty | |-- 1 | |-- 2 | `-- 3 `-- non-empty2 |-- 1 |-- 2 `-- 3
(this is comparable to what you have I assume)
and this command:
tar -vv --create -f tar-test.tar --exclude /tmp/test/web/exclude/ -C /tmp/test/web/
I get the following archive: sigurdur@??:/tmp$ tar -tf tar-test.tar ./ ./empty/ ./empty2/ ./non-empty/ ./non-empty/1 ./non-empty/2 ./non-empty/3 ./non-empty2/ ./non-empty2/1 ./non-empty2/2 ./non-empty2/3 ./exclude/ ./exclude/1 ./exclude/2 ./exclude/3
kind regards,
-sig
-- Sigurd Urdahl Linux, goofing, cooking, making fire, computer security, having a beer. Give me good music.
- Follow-Ups:
- Re: [tlug] Using tar to archive files
- From: Edmund Edgar
- References:
- [tlug] Using tar to archive files
- From: Dave M G
- Re: [tlug] Using tar to archive files
- From: Edmund Edgar
- Re: [tlug] Using tar to archive files
- From: Dave M G
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Excluding a directory with ncftpput
- Next by Date: Re: [tlug] Using tar to archive files
- Previous by thread: Re: [tlug] Using tar to archive files
- Next by thread: Re: [tlug] Using tar to archive files
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links