Tar Question
gerrynix
gerrynix at yahoo.com
Tue Sep 7 21:00:41 UTC 2004
See bottom post as well... ;)
Try:
tar cvfzX ${TAR_FILE} ${EXCLUDE} .
where EXCLUDE=/www/test
-----Original Message-----
From: Darryl W. DeLao Jr. [mailto:ddelao at oucpm.org]
Sent: Tuesday, September 07, 2004 1:46 PM
To: rhn-users at redhat.com; redhat-list at redhat.com;
redhat-install-list at redhat.com
Subject: Tar Question
Is there a way to create a tar file and exclude a specific directory
that is within the directory you want to tar?
For example, I have a directory called /www/ and in that directory is
another directory called /www/test/ and I want to tar up the /www/
directory but I do not want the tar to include the /www/test/
directory but I do want the tar to include all the other
sub-directories within /www/
Thanks!
Darryl
In the "standard" version of tar, I use the X modifier... followed by
an exclude_file (plain ol' ASCII) containing relative pathnames of
what to exclude. Works with c - x - t. Check the man page for the GNU
version.
--
Nix
More information about the Redhat-install-list
mailing list