RE: tar question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx 
> [mailto:redhat-list-bounces@xxxxxxxxxx] 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@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
> 

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux