From owner-freebsd-questions@FreeBSD.ORG Thu Feb 14 05:11:16 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 2651616A419 for ; Thu, 14 Feb 2008 05:11:16 +0000 (UTC) (envelope-from mla@nasreddine.com) Received: from mal35-2-82-225-70-234.fbx.proxad.net (mal35-2-82-225-70-234.fbx.proxad.net [82.225.70.234]) by mx1.freebsd.org (Postfix) with ESMTP id ADCE613C4CE for ; Thu, 14 Feb 2008 05:11:15 +0000 (UTC) (envelope-from mla@nasreddine.com) Received: from localhost (server.nasreddine.info [127.0.0.1]) by mal35-2-82-225-70-234.fbx.proxad.net (Postfix) with ESMTP id 0B0BC23C61; Thu, 14 Feb 2008 06:11:15 +0100 (CET) X-Virus-Scanned: amavisd-new at nasreddine.com Received: from mal35-2-82-225-70-234.fbx.proxad.net ([127.0.0.1]) by localhost (server.nasreddine.info [127.0.0.1]) (amavisd-new, port 10024) with LMTP id d4wMkSv-lAgQ; Thu, 14 Feb 2008 06:11:00 +0100 (CET) Received: from phoenix.nasreddine.info (phoenix.nasreddine.info [192.168.1.3]) by mal35-2-82-225-70-234.fbx.proxad.net (Postfix) with ESMTP id E01B923C62; Thu, 14 Feb 2008 06:11:00 +0100 (CET) Date: Thu, 14 Feb 2008 06:10:47 +0100 From: Wael Nasreddine To: Steel City Phantom Message-ID: <20080214051047.GC31520@phoenix.nasreddine.info> References: <5c99941f0802131957t3fa8f7bo66c30cebfa54d7b6@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Fig2xvG2VGoz8o/s" Content-Disposition: inline In-Reply-To: <5c99941f0802131957t3fa8f7bo66c30cebfa54d7b6@mail.gmail.com> X-OS: Linux 2.6.24-tuxonice i686 X-Editor: VIM - Vi IMproved 7.1 (2007 May 12, compiled Feb 4 2008 15:13:47) X-PGP-Key: http://wael.nasreddine.com/files/Wael_Nasreddine.asc User-Agent: Mutt/1.5.16 (2007-06-09) 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 05:11:16 -0000 --Fig2xvG2VGoz8o/s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This One Time, at Band Camp, Steel City Phantom said, = On Wed, Feb 13, 2008 at 10:57:22PM -0500: > 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 run= s, > 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 af= ter > finishing that, adding all the others? Why won't you just do it this way?? $ tar cvf /usr/local/backupScript/files/www-client-files.tar $( cat /usr/lo= cal/backupScript/include ) --=20 Wael Nasreddine http://wael.nasreddine.com PGP: 1024D/C8DD18A2 06F6 1622 4BC8 4CEB D724 DE12 5565 3945 C8DD 18A2 =2E: An infinite number of monkeys typing into GNU emacs, would never make a good program. (L. Torvalds 1995) :. --Fig2xvG2VGoz8o/s Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.7 (GNU/Linux) iD8DBQFHs81WVWU5RcjdGKIRAn85AKD5PZPXieeTCh2idfhjQR0ttWfiHACgsM2w 3/E8U9gIUlAjR1uf1Kc8l6s= =0wvR -----END PGP SIGNATURE----- --Fig2xvG2VGoz8o/s--