From owner-freebsd-questions Fri Jan 3 2:32:36 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 50A6A37B401 for ; Fri, 3 Jan 2003 02:32:35 -0800 (PST) Received: from foem.leiden.webweaving.org (fia224-72.dsl.hccnet.nl [62.251.72.224]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2140A43EA9 for ; Fri, 3 Jan 2003 02:32:30 -0800 (PST) (envelope-from dirkx@webweaving.org) Received: from foem (foem [10.11.0.2]) by foem.leiden.webweaving.org (8.12.6/8.12.6) with ESMTP id h03AVmfh003022 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Fri, 3 Jan 2003 11:32:13 +0100 (CET) (envelope-from dirkx@webweaving.org) Date: Fri, 3 Jan 2003 11:31:48 +0100 (CET) From: Dirk-Willem van Gulik X-X-Sender: dirkx@foem.leiden.webweaving.org To: mike Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Shell guru needed. In-Reply-To: <200301030103.h0313b67012698@labs.unixhideout.com> Message-ID: <20030103113035.O48300-100000@foem.leiden.webweaving.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Try any unix primer or man find or find /my/unorganized/dir -name '*.pdf' -type f -exec echo mv {} /my/pdfs \; and pray that you do not have files with identical names. On Thu, 2 Jan 2003, 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. > > 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