From owner-freebsd-questions@FreeBSD.ORG Sun Jul 11 03:08:54 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1E83516A4CE for ; Sun, 11 Jul 2004 03:08:54 +0000 (GMT) Received: from web02-imail.bloor.is.net.cable.rogers.com (web02-imail.bloor.is.net.cable.rogers.com [66.185.86.76]) by mx1.FreeBSD.org (Postfix) with ESMTP id 997EF43D1D for ; Sun, 11 Jul 2004 03:08:53 +0000 (GMT) (envelope-from Mike.Jeays@rogers.com) Received: from [192.168.2.100] ([24.43.93.57]) by web02-imail.bloor.is.net.cable.rogers.comESMTP <20040711030750.JGEN504061.web02-imail.bloor.is.net.cable.rogers.com@[192.168.2.100]>; Sat, 10 Jul 2004 23:07:50 -0400 From: Mike Jeays To: D Golden In-Reply-To: <2785.192.168.1.1.1089514540.squirrel@192.168.1.1> References: <2785.192.168.1.1.1089514540.squirrel@192.168.1.1> Content-Type: text/plain Organization: Message-Id: <1089515332.40098.4.camel@chaucer> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.4 Date: 10 Jul 2004 23:08:52 -0400 Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH PLAIN at web02-imail.bloor.is.net.cable.rogers.com from [24.43.93.57] using ID at Sat, 10 Jul 2004 23:07:49 -0400 cc: freebsd-questions@freebsd.org Subject: Re: excluding from tar X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Jul 2004 03:08:54 -0000 On Sat, 2004-07-10 at 22:55, D Golden wrote: > I've created a tar archive of my entire system, but I want to exclude > everything in /proc , /usr/ports, and the FILE /usr/backup.tar when > updating the archive. I've tried: > > 1. cd / && tar -vu --file /usr/backup.tar * --exclude=/proc > --exclude=/usr/ports --exclude=/usr/backup.tar > > 2. cd / && tar -vu --file /usr/backup.tar * --exclude=/proc/* > --exclude=/usr/ports/* --exclude=/usr/backup.tar > > 3. cd / && tar -vu -X /root/nodump --file /usr/backup.tar * > > and in /root/nodump I have 3 lines: > > /proc # Also tried /proc/* > /usr/ports # Also tried /usr/ports/* > /usr/backup.tar > > However, in all three examples, /proc , /usr/ports, and the FILE get updated. > > What am I missing? > > Dana > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" Tar removes the leading "/" from file names before doing the comparison, so you have to leave them out in the --exclude strings. Try usr/ports/*, for example, instead of /usr/ports/*.