From owner-freebsd-questions@FreeBSD.ORG Thu Feb 14 14:20:55 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 E2FA816A418 for ; Thu, 14 Feb 2008 14:20:55 +0000 (UTC) (envelope-from maddaemon@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.184]) by mx1.freebsd.org (Postfix) with ESMTP id 6EEA413C459 for ; Thu, 14 Feb 2008 14:20:55 +0000 (UTC) (envelope-from maddaemon@gmail.com) Received: by fk-out-0910.google.com with SMTP id b27so410559fka.11 for ; Thu, 14 Feb 2008 06:20:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=mnkjSSlS4Kyo69sQQFVq9I47akICbzMo44aWc3RLf98=; b=iknL7LarCaC5vUrvCYsEBETshAD9yk3cTWLhCdTsdvvNfK/6Z1kxi8SCZq6xOHGeBlPRMXMX0lNkMlhQXXyDJYV2rADT9VzF+yJhKSRyh5L+eUfASiFgLsOm7w3IzzoCaLvg3xHbRY1g60VWYC+WfSg4z0euCapbILgUjjFlywU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nxZZfqHtU1Er1rS79ewuEzpKyqhHb69lKB1yPaYULxVDL9e6Vs7qpew9T1iq2QPxeS5krYh46reqSepnj3GalGCXszH8LE+Oo7qMjEis0nizVGC4wzGWH3O99Oj9LkLCbuaXf0++Hf6IAZeYPRfYNoTsI0tT2AdtNqZZhwluFQY= Received: by 10.82.166.9 with SMTP id o9mr787202bue.34.1202997348528; Thu, 14 Feb 2008 05:55:48 -0800 (PST) Received: by 10.82.188.6 with HTTP; Thu, 14 Feb 2008 05:55:48 -0800 (PST) Message-ID: <6c1774c50802140555y2ee5fb26qdddebcf59c943650@mail.gmail.com> Date: Thu, 14 Feb 2008 08:55:48 -0500 From: "The MadDaemon" To: freebsd-questions@freebsd.org In-Reply-To: <20080214051047.GC31520@phoenix.nasreddine.info> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5c99941f0802131957t3fa8f7bo66c30cebfa54d7b6@mail.gmail.com> <20080214051047.GC31520@phoenix.nasreddine.info> 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:20:56 -0000 I believe the -T switch in tar is for "include the files in {file}" tar cvf myfile.tar -T path/to/include On 2/14/08, Wael Nasreddine wrote: > 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 > 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? > > Why won't you just do it this way?? > > $ tar cvf /usr/local/backupScript/files/www-client-files.tar $( cat > /usr/local/backupScript/include ) > > -- > Wael Nasreddine > http://wael.nasreddine.com > PGP: 1024D/C8DD18A2 06F6 1622 4BC8 4CEB D724 DE12 5565 3945 C8DD 18A2 > > .: An infinite number of monkeys typing into GNU emacs, > would never make a good program. (L. Torvalds 1995) :. > -- It said "use Linux 2.4 kernel or better" so I installed FreeBSD. Now everything runs better. Why didn't they just tell me to do that to begin with?