Date: Tue, 1 Aug 2000 14:22:24 +0200 From: Matthew West <mwest@uct.ac.za> To: Nathan Vidican <webmaster@wmptl.com> Cc: questions@FreeBSD.ORG Subject: Re: excluding a file/dir from a tar file Message-ID: <20000801142223.A93938@apotheosis.org.za> In-Reply-To: <3986BD05.3D19504D@wmptl.com>; from "Nathan Vidican" on Tue, Aug 01, 2000 at 08:05:25AM References: <3986BD05.3D19504D@wmptl.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 01, 2000 at 08:05:25AM -0400, Nathan Vidican wrote: > I know the flag is --exclude, but where exactly do I put the flag in? > Could someone post an example of a working version of this: > > tar cvzf --exclude /server --exclude /mail /server/master.tgz / The -f flag takes the argument immediately after it to be the filename, whcih is why you're ending up with "--exclude" tar files. This should work: tar -cvzf /server/master.tgz --exclude /server --exclude /mail / or even tar -cvz --exclude /server --exclude -f /server/master.tgz / > Seeing as how rm doesn't like filenames with a '-' prepended to > them, I've been having some difficulty trying to clean uo 600~meg > '--exclude' files from my system. rm -- --exclude -- mwest@uct.ac.za To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000801142223.A93938>