Date: Thu, 02 Jan 2003 20:55:05 -0500 From: Mike Jeays <mj001@rogers.com> To: mike <mike@labs.unixhideout.com> Cc: freebsd-questions@freebsd.org Subject: Re: Shell guru needed. Message-ID: <3E14ED79.3040302@rogers.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. > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message > > > This should do it. Note the use of back-ticks to execute a command for f in `find . -name "*pdf"` do mv $f /target-directory done 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?3E14ED79.3040302>