using tar

Alexander Dalloz ad+lists at uni-x.org
Mon Jun 13 22:48:06 UTC 2005


Am Di, den 14.06.2005 schrieb yahootintin.11730620 at bloglines.com um
0:24:

> i'm using tar to gzip some directories like this:
>   tar cvzf ~/foo.tar.gz
> /foo
> 
> this tars everything in the foo directory.  but i want it to tar everything
> in the foo directory except for the bar subdirectory (eg. /foo/bar).  i've
> looked at the man pages and can't figure out how the exclude flag works.

tar czvf ~/foo.tar.gz --exclude=/foo/bar* /foo

or

tar czv --exclude=/foo/bar* -f /foo.tar.gz /foo

Alexander
 

-- 
Alexander Dalloz | Enger, Germany | GPG http://pgp.mit.edu 0xB366A773
legal statement: http://www.uni-x.org/legal.html
Fedora Core 2 GNU/Linux on Athlon with kernel 2.6.11-1.27_FC2smp 
Serendipity 00:42:15 up 20 days, 23:20, load average: 0.37, 0.48, 0.76 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20050614/844aa379/attachment-0001.sig>


More information about the fedora-list mailing list