From owner-freebsd-questions@FreeBSD.ORG Fri Oct 24 22:06:05 2003 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 0D87416A4B3 for ; Fri, 24 Oct 2003 22:06:05 -0700 (PDT) Received: from blue.gerhardt-it.com (gw.gerhardt-it.com [204.83.38.103]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0903E43FB1 for ; Fri, 24 Oct 2003 22:06:04 -0700 (PDT) (envelope-from scott@g-it.ca) Received: from g-it.ca (h24-78-101-202.ss.shawcable.net [24.78.101.202]) by blue.gerhardt-it.com (Postfix) with ESMTP id 14CD5FDAD; Fri, 24 Oct 2003 23:06:02 -0600 (CST) Date: Fri, 24 Oct 2003 23:05:59 -0600 Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v552) To: 479001601@mail.ru From: Scott Gerhardt In-Reply-To: <200310250833.17091.479001601@mail.ru> Message-Id: Content-Transfer-Encoding: 7bit X-Mailer: Apple Mail (2.552) cc: Calvin Gordon cc: FreeBSD Subject: Re: Help: tar & find 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: Sat, 25 Oct 2003 05:06:05 -0000 On Friday, October 24, 2003, at 10:33 PM, CBuH. wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > > On Thursday 23 October 2003 15:34, Matthew Seaman wrote: >> On Wed, Oct 22, 2003 at 10:43:50PM -0600, Scott Gerhardt wrote: > [....skipped,,,,] >> >> The problem is that you have file/directory names like 'ROOF LAYOUTS' >> which contain spaces and possibly other filenames containing >> characters with syntactic significance to the shell. >> >> Try: >> >> find $FILES_DIR -xdev -type f -iname "*.bak -print0 | \ >> xargs -0 tar --remove-files -cvzpf $TAR_DIR/bak_files_`date >> +%F`.tar.gz > > It'll have some _bad_ features: > If ``find'' will found to many files (default number of arguments to > be passed > by xargs to the ``utility'' (the tar command) is 5000, the default > size of > the command line is MAX_ARG (2048 bytes) //from man xargs), then xargs > will > run the ``utility'' twice, or more times,... consider it will be a > very small > differenses in time, you'll get that the last tar invocation 'll > replace your > archievs with that time stamp. > > IMHO. > > WBR, CBuH. > > - -- > Thanks for the response, but what would be a better solution? Thanks, -- Scott A. Gerhardt, P.Geo. Gerhardt Information Technologies