From owner-freebsd-questions@FreeBSD.ORG Fri Oct 24 21:33:23 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 09FD316A4D6 for ; Fri, 24 Oct 2003 21:33:23 -0700 (PDT) Received: from f4.mail.ru (f4.mail.ru [194.67.57.34]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0309D43F93 for ; Fri, 24 Oct 2003 21:33:22 -0700 (PDT) (envelope-from 479001601@mail.ru) Received: from [212.46.200.110] (port=3467 helo=telefen) by f4.mail.ru with asmtp id 1ADG7A-000248-00; Sat, 25 Oct 2003 08:33:25 +0400 X-AntiVirus: Checked by Dr.Web (http://www.drweb.net) From: "CBuH." <479001601@mail.ru> Organization: -+=- To: Matthew Seaman , Scott Gerhardt Date: Sat, 25 Oct 2003 08:33:15 +0400 User-Agent: KMail/1.5.3 References: <7F19C442-0513-11D8-8F40-000393801C60@g-it.ca> <20031023113439.GC39601@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <20031023113439.GC39601@happy-idiot-talk.infracaninophile.co.uk> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Description: clearsigned data Content-Disposition: inline Message-Id: <200310250833.17091.479001601@mail.ru> X-Spam: Not detected cc: FreeBSD Subject: Re: Fwd: Help: tar & find X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: 479001601@mail.ru List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Oct 2003 04:33:23 -0000 =2D----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 pas= sed=20 by xargs to the ``utility'' (the tar command) is 5000, the default size of= =20 the command line is MAX_ARG (2048 bytes) //from man xargs), then xargs will= =20 run the ``utility'' twice, or more times,... consider it will be a very sma= ll=20 differenses in time, you'll get that the last tar invocation 'll replace yo= ur=20 archievs with that time stamp. IMHO. WBR, CBuH. =2D --=20 CBuH. CG[CX] XVyGYjau 479001600@mail.ru, ICQ#70929413 GnuPG(PGP) public key is: http://ccclike.chat.ru/my_public_key.asc =09 =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/mf0L5Cj3gqxcdCoRAtvPAJ98ygwLGD1Oxprvl+TlOEEP99R7ygCeL8tR L5loOfn5U3sJDVpRzVG4MvY=3D =3DmJGX =2D----END PGP SIGNATURE-----