From owner-freebsd-questions Fri Jan 3 7:25:50 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 1B4E837B401 for ; Fri, 3 Jan 2003 07:25:49 -0800 (PST) Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3D1D43EC5 for ; Fri, 3 Jan 2003 07:25:48 -0800 (PST) (envelope-from deepbsd@earthlink.net) Received: from user-119a2km.biz.mindspring.com ([66.149.10.150] helo=sylvester.dsj.net) by avocet.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 18UTh6-0002JR-00; Fri, 03 Jan 2003 07:25:08 -0800 Received: from sylvester.dsj.net (dsj@localhost [127.0.0.1]) by sylvester.dsj.net (8.12.3/8.12.3/Debian -4) with ESMTP id h03FP64j002081; Fri, 3 Jan 2003 10:25:06 -0500 Received: (from dsj@localhost) by sylvester.dsj.net (8.12.3/8.12.3/Debian -4) id h03FP2TO002068; Fri, 3 Jan 2003 10:25:02 -0500 X-Authentication-Warning: sylvester.dsj.net: dsj set sender to deepbsd@earthlink.net using -f Date: Fri, 3 Jan 2003 10:25:02 -0500 From: "David S. Jackson" To: mike Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Shell guru needed. Message-ID: <20030103152501.GA1925@sylvester.dsj.net> Reply-To: "David S. Jackson" References: <200301030103.h0313b67012698@labs.unixhideout.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200301030103.h0313b67012698@labs.unixhideout.com> User-Agent: Mutt/1.4i 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 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