[NTLUG:Discuss] scripting help
MadHat
madhat at unspecific.com
Fri Mar 5 09:59:33 CST 2004
On Mar 5, 2004, at 8:18 AM, Mailing Lists wrote:
> I need to consolidate a large number of image files into a single
> directory. Currently the images are spread out over multiple
> directories. Is there an easy way to find all of these files and move
> them to a specified directory. The files are images for a large
> website and i want to consolidate them all into a
> /var/www/mywebsite/images directory. How can I do this.
>
find . -type f -name "*.jpg" -exec mv {} /var/www/mywebsite/ \;
or if you are a little scared, you can do
find . -type f -name "*.jpg" -ok mv {} /var/www/mywebsite/ \;
and it will prompt before each mv command.
More information about the Discuss
mailing list