Date: 10 Jul 2004 23:08:52 -0400 From: Mike Jeays <Mike.Jeays@rogers.com> To: D Golden <dana@coastal-law.org> Cc: freebsd-questions@freebsd.org Subject: Re: excluding from tar Message-ID: <1089515332.40098.4.camel@chaucer> In-Reply-To: <2785.192.168.1.1.1089514540.squirrel@192.168.1.1> References: <2785.192.168.1.1.1089514540.squirrel@192.168.1.1>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2004-07-10 at 22:55, D Golden wrote: > I've created a tar archive of my entire system, but I want to exclude > everything in /proc , /usr/ports, and the FILE /usr/backup.tar when > updating the archive. I've tried: > > 1. cd / && tar -vu --file /usr/backup.tar * --exclude=/proc > --exclude=/usr/ports --exclude=/usr/backup.tar > > 2. cd / && tar -vu --file /usr/backup.tar * --exclude=/proc/* > --exclude=/usr/ports/* --exclude=/usr/backup.tar > > 3. cd / && tar -vu -X /root/nodump --file /usr/backup.tar * > > and in /root/nodump I have 3 lines: > > /proc # Also tried /proc/* > /usr/ports # Also tried /usr/ports/* > /usr/backup.tar > > However, in all three examples, /proc , /usr/ports, and the FILE get updated. > > What am I missing? > > Dana > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" Tar removes the leading "/" from file names before doing the comparison, so you have to leave them out in the --exclude strings. Try usr/ports/*, for example, instead of /usr/ports/*.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1089515332.40098.4.camel>