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] Tar excluding some folders
- Date: Sat, 14 Feb 2004 22:15:53 +0900
- From: Edward Wright <edw@example.com>
- Subject: Re: [tlug] Tar excluding some folders
- References: <20040213154042.59927.qmail@example.com> <87znbmyyv9.fsf@example.com> <20040214.194907.104029612.acmuller@example.com>
- User-agent: Mutt/1.4i
On Sat, Feb 14, 2004 at 07:49:07PM +0900, Charles Muller wrote: > susumu> It must be in relative path in the archive. > > stephen> This isn't quite true; it should be relative to whatever tar considers > stephen> the current directory. That's usually `pwd`, but can be changed with > stephen> the -C flag. This detail is not relevant to Chuck's case, since he's > stephen> put the tarball in the current directory and doesn't use -C. > > tar cvzfP /mnt/win_d/chuck-exclude.tar.gz -X /home/chuck/chuck-exclude.txt /home/chuck > > Unless I'm missing something, I thought that I was putting the tarball > in /mnt/win_d. (?) > > Anyway, reading Stephen's comments, I tried this > > tar cvzfP /mnt/win_d/chuck-exclude.tar.gz -C /home/chuck/ -X chuck-exclude.txt /home/chuck > > > which also runs, but still no elimination of unwanted directories. It's the path *inside* the exclude file that must be relative to tar's idea of pwd. In your original post your paths (in the exclude file) all begin with a / which is an absolute, not relative, path. Try, for example, running tar from the root directory, with your original exclude file, only strip the leading slashes. Exclude file contents: home/chuck/Desktop home/chuck/.kde home/chuck/evolution ... etc. Command: tar cvzfP /mnt/win_d/chuck.tar.gz /home/chuck -X path-to-file/chuck-exclude Best, Ed Wright > Anyway, I can do it the other way around, i.e., running off an > "inclusions" file rather than exclusions file, and it seems like it will > basically take the same type of effort to maintain one or the > other. Nonetheless, it would be interesting to learn if it is indeed > possible. >
- Follow-Ups:
- Re: [tlug] Tar excluding some folders
- From: Edward Wright
- Re: [tlug] Tar excluding some folders
- From: Charles Muller
- References:
- Re: [tlug] Tar excluding some folders
- From: Susumu ISHIZUKA
- Re: [tlug] Tar excluding some folders
- From: Stephen J. Turnbull
- Re: [tlug] Tar excluding some folders
- From: Charles Muller
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Is linguistics OT at all? & HOWTO Encourage Women in Linux
- Next by Date: Re: [tlug] Tar excluding some folders
- Previous by thread: Re: [tlug] Tar excluding some folders
- Next by thread: Re: [tlug] Tar excluding some folders
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links