Tar Question
Brian D. McGrew
brian at doubledimension.com
Tue Sep 7 21:12:07 UTC 2004
WwW=/www
EXC=/tmp/exc.$$
cat $EXC <<EOF
/www/test
EOF
tar -zcfX /tmp/www.tar.gz $EXC -C /$WwW .
You can add anything you need to the exclude list just make sure it's
before the EOF marker. Set $WwW to be whatever directory it is that
you're trying to tar up.
I have a script that does all this for me that I use in a nightly cron
job. If you'd like, email me personally and I'll send it to you.
-brian
Brian D. McGrew { brian at doubledimension.com ||
pacemakertaker at yahoo.com }
--
> YOU! Off my planet!
On Sep 7, 2004, at 1:45 PM, Darryl W. DeLao Jr. wrote:
> 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
>
>
>
>
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
More information about the redhat-list
mailing list