From owner-freebsd-questions Tue Aug 1 9:45:31 2000 Delivered-To: freebsd-questions@freebsd.org Received: from web2.sea.nwserv.com (web2.sea.nwserv.com [216.145.16.2]) by hub.freebsd.org (Postfix) with ESMTP id 79C9437BD2E for ; Tue, 1 Aug 2000 09:45:27 -0700 (PDT) (envelope-from dpk@nwserv.com) Received: from localhost (dpk@localhost) by web2.sea.nwserv.com (8.9.3/8.9.2) with ESMTP id JAA20934; Tue, 1 Aug 2000 09:45:09 -0700 (PDT) (envelope-from dpk@nwserv.com) Date: Tue, 1 Aug 2000 09:45:08 -0700 (PDT) From: David Kirchner X-Sender: dpk@web2.sea.nwserv.com To: Nathan Vidican Cc: questions@FreeBSD.ORG Subject: Re: excluding a file/dir from a tar file In-Reply-To: <3986BD05.3D19504D@wmptl.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Envelope-To: webmaster@wmptl.com Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 1 Aug 2000, 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 GNU-style (--[foo]) flags will not work if you do not include a - before the single-char flags. Also, as someone else mentioned, the output file should be immediately after the '-f'. So for the above to work you'd need: tar -cvzf /server/master.tgz --exclude /server --exclude /mail / IMO, the tar page should be updated to reflect this (I don't know how to do that, myself) -- David Kirchner, dpk@nwserv.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message