From owner-freebsd-questions Fri Jan 3 7:55:23 2003 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 3388937B401 for ; Fri, 3 Jan 2003 07:55:22 -0800 (PST) Received: from marlo.eagle.ca (marlo.eagle.ca [209.167.16.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 75BF543E4A for ; Fri, 3 Jan 2003 07:55:21 -0800 (PST) (envelope-from lists@brenius.com) Received: from afi (244.eagle.speede.com [64.39.177.244]) by marlo.eagle.ca (8.11.3/8.11.3) with SMTP id h03FtKi32842; Fri, 3 Jan 2003 10:55:20 -0500 (EST) (envelope-from lists@brenius.com) Message-ID: <003301c2b340$7e473570$7801a8c0@afi> From: "Danny" To: Cc: References: <200301030103.h0313b67012698@labs.unixhideout.com> <20030103152501.GA1925@sylvester.dsj.net> Subject: Re: Shell guru needed.(xargs question) Date: Fri, 3 Jan 2003 10:55:09 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Could you please give another realworld example of using xargs and your definition of it. I had a glance through man xargs, but I enjoy input from humans that use it as well. :) Thanks. ----- Original Message ----- From: "David S. Jackson" To: "mike" Cc: Sent: Friday, January 03, 2003 10:25 AM Subject: Re: Shell guru needed. > On Thu, Jan 02, 2003 at 08:03:37PM -0500 mike wrote: > > Hey guys. heres the skinny. I have a huge library and i want to > > organize it. I want find to go through recursively, and move any "pdf" > > files it finds to a certain directory. I need an example piece of > > script on how i would confront this. It will save me hours if not days > > so thanks in advance. > > Can't believe no one has used xargs yet... > > find /path/to/messydir -name '*.pdf' -type f | xargs -I % mv \ > /path/to/messydir/% /path/to/newdir/% > > -- > David S. Jackson dsj@dsj.net > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Don't worry about the world coming to an end today. > It's already tomorrow in Australia. -- Charles Schulz > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message