Date: Mon, 30 Sep 2002 17:13:26 +0300 From: Peter Pentchev <roam@ringlet.net> To: Andrew Nelson <andrew__nelson@hotmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: using tar --exclude in FreeBSD.. Message-ID: <20020930141325.GA11474@straylight.oblivion.bg> In-Reply-To: <F17lQoMuDGzxTs53iVd000009f3@hotmail.com> References: <F17lQoMuDGzxTs53iVd000009f3@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Mon, Sep 30, 2002 at 10:14:42PM +1000, Andrew Nelson wrote: > Hi, > > I'm having trouble using tar with simple exclusion > rules.. I'd like to be able to run something like this: > > tar cfvzp etc-backup.tgz /etc/ > > but exclude all *.gz files. I can only the --exclude syntax > of tar if I leave off the -vzp options. Why doesn't the > following work? > > tar cfvzp --exclude="*.gz" usr-backup.tgz /etc/ I have found that tar only accepts any options after the initial ones if the initial ones are specified in the canonical way, using a dash. That is, I believe the following should work: tar -cfvzp usr-backup.tgz --exclude="*.gz" /etc/ Besides, as someone else pointed out, the 'f' in the option string specifies that the next argument is a filename; so put the filename next :) G'luck, Peter -- Peter Pentchev roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 This inert sentence is my body, but my soul is alive, dancing in the sparks of your brain. [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9mFwF7Ri2jRYZRVMRAtSYAJwMi0myfOTPMlulf4jqW3wV3/WJQgCgsRlE nDI+42lf1SLOypQ5ClZTM+s= =E7lK -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020930141325.GA11474>
