From owner-freebsd-hackers Mon Sep 30 7:13:38 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0E9D937B401 for ; Mon, 30 Sep 2002 07:13:37 -0700 (PDT) Received: from south.nanolink.com (south.nanolink.com [217.75.134.10]) by mx1.FreeBSD.org (Postfix) with SMTP id A33C643E4A for ; Mon, 30 Sep 2002 07:13:35 -0700 (PDT) (envelope-from roam@ringlet.net) Received: (qmail 70507 invoked by uid 85); 30 Sep 2002 14:23:18 -0000 Received: from office.sbnd.net (HELO straylight.ringlet.net) (217.75.140.130) by south.nanolink.com with SMTP; 30 Sep 2002 14:23:15 -0000 Received: (qmail 16699 invoked by uid 1000); 30 Sep 2002 14:13:26 -0000 Date: Mon, 30 Sep 2002 17:13:26 +0300 From: Peter Pentchev To: Andrew Nelson Cc: freebsd-hackers@freebsd.org Subject: Re: using tar --exclude in FreeBSD.. Message-ID: <20020930141325.GA11474@straylight.oblivion.bg> Mail-Followup-To: Andrew Nelson , freebsd-hackers@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UugvWAfsgieZRqgk" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.1i X-Virus-Scanned: by Nik's Monitoring Daemon (AMaViS perl-11d ) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --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