From owner-freebsd-questions Fri Jan 3 8:41: 8 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 E7C7537B401 for ; Fri, 3 Jan 2003 08:41:07 -0800 (PST) Received: from moroni.pp.asu.edu (moroni.pp.asu.edu [129.219.120.183]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5AEA443EDC for ; Fri, 3 Jan 2003 08:41:07 -0800 (PST) (envelope-from iddwb@moroni.pp.asu.edu) Received: (from iddwb@localhost) by moroni.pp.asu.edu (8.11.6/8.11.6) id h03GZNm15156; Fri, 3 Jan 2003 09:35:23 -0700 Date: Fri, 3 Jan 2003 09:35:23 -0700 From: David Bear To: mike Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Shell guru needed. Message-ID: <20030103093523.A15099@asu.edu> Reply-To: David.Bear@asu.edu References: <200301030103.h0313b67012698@labs.unixhideout.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200301030103.h0313b67012698@labs.unixhideout.com>; from mike@labs.unixhideout.com on Thu, Jan 02, 2003 at 08:03:37PM -0500 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. I'm no shell guru but how about something like find ./yourdirectory -name "*pdf" -exec mv {} ./newdirectory \; you may have to play with the syntax a little but wouldn't this do it? > -- David Bear College of Public Programs/ASU Mail Code 0803 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message