From owner-freebsd-questions@FreeBSD.ORG Thu Feb 14 14:38:43 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 196BF16A419 for ; Thu, 14 Feb 2008 14:38:43 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.ilk.org (dsl092-078-145.bos1.dsl.speakeasy.net [66.92.78.145]) by mx1.freebsd.org (Postfix) with ESMTP id E2B7413C474 for ; Thu, 14 Feb 2008 14:38:42 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.ilk.org (Postfix, from userid 1147) id 1799828449; Thu, 14 Feb 2008 09:38:41 -0500 (EST) To: "Steel City Phantom" References: <5c99941f0802131957t3fa8f7bo66c30cebfa54d7b6@mail.gmail.com> From: Lowell Gilbert Date: Thu, 14 Feb 2008 09:38:41 -0500 In-Reply-To: <5c99941f0802131957t3fa8f7bo66c30cebfa54d7b6@mail.gmail.com> (Steel City Phantom's message of "Wed\, 13 Feb 2008 22\:57\:22 -0500") Message-ID: <44ve4r7gcu.fsf@be-well.ilk.org> User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@freebsd.org Subject: Re: tar backup script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2008 14:38:43 -0000 "Steel City Phantom" writes: > this isn't really bsd specific but i still need help with it. im writing a > backup script a clip from that script is this: > > find /usr/local/www/data-dist/ -name config.php > > /usr/local/backupScript/include > find /usr/local/www/data-dist/ -name ClientFiles >> > /usr/local/backupScript/include > > tar cvf /usr/local/backupScript/files/www-client-files.tar -I > /usr/local/backupScript/include /usr/local/www/data-dist > > obviously im creating an include file from a directory. when the tar runs, > it correctly adds all the files in the include file. but once that is > finished, for some reason tar then goes back and adds all the files that are > in the /usr/local/www/data-dist directory, even the ones in the include > file. i was under the impression that the -I command would add ONLY the > files that are listed in the include. why is it adding those and then after > finishing that, adding all the others? You specified /usr/local/www/data-dist on the command line, so you get the directory and everything in it. The -I command *does* add just the files in the include file, but then specifying data-dist explicitly gets everything in it.