From owner-freebsd-questions Tue Aug 1 5:23:35 2000 Delivered-To: freebsd-questions@freebsd.org Received: from apotheosis.org.za (apotheosis.org.za [137.158.128.27]) by hub.freebsd.org (Postfix) with ESMTP id 3101537BB2F for ; Tue, 1 Aug 2000 05:23:15 -0700 (PDT) (envelope-from mwest@uct.ac.za) Date: Tue, 1 Aug 2000 14:22:24 +0200 From: Matthew West To: Nathan Vidican Cc: questions@FreeBSD.ORG Subject: Re: excluding a file/dir from a tar file Message-ID: <20000801142223.A93938@apotheosis.org.za> Mail-Followup-To: Nathan Vidican , questions@FreeBSD.ORG References: <3986BD05.3D19504D@wmptl.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3986BD05.3D19504D@wmptl.com>; from "Nathan Vidican" on Tue, Aug 01, 2000 at 08:05:25AM Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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