From owner-freebsd-questions@FreeBSD.ORG Thu Feb 14 15:13:22 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 CF5F416A46B for ; Thu, 14 Feb 2008 15:13:22 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from betty.computinginnovations.com (mail.computinginnovations.com [64.81.227.250]) by mx1.freebsd.org (Postfix) with ESMTP id 8330D13C4E1 for ; Thu, 14 Feb 2008 15:13:22 +0000 (UTC) (envelope-from derek@computinginnovations.com) Received: from p28.computinginnovations.com (dhcp-10-20-30-100.computinginnovations.com [10.20.30.100]) (authenticated bits=0) by betty.computinginnovations.com (8.14.2/8.13.8) with ESMTP id m1EFD0F7013480; Thu, 14 Feb 2008 09:13:00 -0600 (CST) (envelope-from derek@computinginnovations.com) Message-Id: <6.0.0.22.2.20080214091053.0242a400@mail.computinginnovations.com> X-Sender: derek@mail.computinginnovations.com X-Mailer: QUALCOMM Windows Eudora Version 6.0.0.22 Date: Thu, 14 Feb 2008 09:12:53 -0600 To: "Steel City Phantom" , freebsd-questions@freebsd.org From: Derek Ragona In-Reply-To: <5c99941f0802131957t3fa8f7bo66c30cebfa54d7b6@mail.gmail.com > References: <5c99941f0802131957t3fa8f7bo66c30cebfa54d7b6@mail.gmail.com> Mime-Version: 1.0 X-ComputingInnovations-MailScanner-Information: Please contact the ISP for more information X-ComputingInnovations-MailScanner: Found to be clean X-ComputingInnovations-MailScanner-From: derek@computinginnovations.com X-Spam-Status: No Content-Type: text/plain; charset="us-ascii"; format=flowed X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: 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 15:13:22 -0000 At 09:57 PM 2/13/2008, Steel City Phantom wrote: >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? As you have found -I which is the same as -T will read the file, and in create mode add those files to the tar volume, but then the next param is read as another pattern to archive. Why not do just: tar cvf /usr/local/backupScript/files/www-client-files.tar -I /usr/local/backupScript/include -Derek -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.