tar question

Dege, Robert C. robert.dege at ngc.com
Thu Oct 6 17:40:37 UTC 2005


Tar will only exclude patterns that match the list in the archive it's
creating.  So first, you need to drop the '/', since tar automatically
drops that.

So your tar line should look like this:

# tar -cvf /backup.tar --exclude=home/tempuser/work /home/tempuser

-Rob

> -----Original Message-----
> From: redhat-list-bounces at redhat.com 
> [mailto:redhat-list-bounces at redhat.com] On Behalf Of David 
> Tonhofer, m-plify S.A.
> Sent: Thursday, October 06, 2005 1:25 PM
> To: General Red Hat Linux discussion list
> Subject: Re: tar question
> 
> > I'm trying to tar up a directory (/home/tempuser) that contains a 
> > bunch of subdirectories.  One of the subdirectories 
> > (/home/tempuser/work), I would like to omit from being 
> tar'd.  I'm using the command:
> >
> > tar cvf backup.tar --exclude="/home/tempuser/work"
> 
> That *should* work. Can you try w/o the equals sign?
> 
> For example, an outrageously parametrized tar:
> 
> tar --create --preserve --blocking-factor 128 --totals 
> --block-number --ignore-failed-read --file /dev/nst0 
> --user-compress-program encyrpt.sh --label ARCHIVE_3 
> /timestamp /home /stop --exclude /home/smbalal --exclude 
> /home/smbbeto --exclude /home/smbdato
> 
> 
> 
> 
> --
> 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