I understand that, but it has to be recursive. Like doing find  /home/fred 
-exec mv *.foo fred/directory (I don't know the syntax for find) or ls -R fred 
| mv *.foo /home/directory
Sent on the Sprint® Now Network from my BlackBerry®

-----Original Message-----
From: Jeremiah Bess <[email protected]>
Sender: [email protected]
Date: Sun, 18 Jul 2010 12:08:18 
To: <[email protected]>
Reply-To: [email protected]
Subject: Re: [lug:16560] Find and move all files with certain file extension

While in the directory that currently contains your files, type:

mv *.mp3 /home/music

mv is move
*.mp3 selects all files with the mp3 extention
/home/music is the destination to move the files to.

Jeremiah E. Bess
Network Ninja, Penguin Geek, Father of four


On Sun, Jul 18, 2010 at 12:05, rhinox <[email protected]> wrote:

> Need a quick command or script to find and move all files with a given
> extension to the specified directory. I know that this is simple, i
> just can't remember how to do it.
>
> --
> You received this message because you are subscribed to the Linux Users
> Group.
> To post a message, send email to [email protected]
> To unsubscribe, send email to [email protected]
> For more options, visit our group at
> http://groups.google.com/group/linuxusersgroup

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

Reply via email to