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
--UugvWAfsgieZRqgk Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 30, 2002 at 10:14:42PM +1000, Andrew Nelson wrote: > Hi, >=20 > I'm having trouble using tar with simple exclusion > rules.. I'd like to be able to run something like this: >=20 > tar cfvzp etc-backup.tgz /etc/ >=20 > 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? >=20 > tar cfvzp --exclude=3D"*.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=3D"*.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 --=20 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. --UugvWAfsgieZRqgk Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (FreeBSD) iD8DBQE9mFwF7Ri2jRYZRVMRAtSYAJwMi0myfOTPMlulf4jqW3wV3/WJQgCgsRlE nDI+42lf1SLOypQ5ClZTM+s= =E7lK -----END PGP SIGNATURE----- --UugvWAfsgieZRqgk-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020930141325.GA11474>