Date: Thu, 02 Jan 2003 17:54:13 -0800 From: paul <pkdb1@attbi.com> To: mike <mike@labs.unixhideout.com> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Shell guru needed. Message-ID: <3E14ED45.5060506@attbi.com> References: <200301030103.h0313b67012698@labs.unixhideout.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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. > you don't say if you need to preserve any of the path information when you move the file. The other poster's suggestion might work: my take on it would be to use a for loop: for i in `find /some/dir -name "*.pdf"`; do mv $i /some/other/dir; done -- Paul Beard: seeking UNIX/internet engineering work <http://paulbeard.no-ip.org/paulbeard.html> 8040 27th Ave NE Seattle WA 98115 / 206 529 8400 There's no real need to do housework -- after four years it doesn't get any worse. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3E14ED45.5060506>