Bash Script to move Files

Marcin Struzak marcin-list at struzak.com
Mon Oct 10 19:08:50 UTC 2005


> Thom Paine wrote:
[...]
> 
> find . -name '*.ogg' -exec mv {} /media/oggs \;
> 
[..]
> It won't move anything repeatedly, but it'll over write files with the 
> same name.  It'll also move directories, if their name ends in ".ogg"

It will not move directories if it's written like this:

  find . -name '*.ogg' -type f -exec mv {} /media/oggs \;

;-)

--Marcin




More information about the fedora-list mailing list