What would be a good way to move a file type from a directory and all of its sub-directories?Like move all *.ogg in /thisdir recursively to /somedir. I tried a couple of things; my best effort was (still not that great):find /thisdir -type f -name '*.ogg' -exec mv /somedir {} \;It returned on each line before each file name, mv: cannot overwrite non-directory `/thisdir/*.ogg' with directory `/somedir'
How can I move files by type recursively from a directory and its sub-directories to another directory?
command line;directory;find;rename
you can use find with xargs for thisfind /thisdir -type f -name *.ogg -print0 | xargs -0 -Imysongs mv -i mysongs /somedir The -I in the above command tells  xargs what replacement string you want  to use (otherwise it adds the  arguments to the end of the command).ORIn your command just try to move '{}' after mv command.find /thisdir -type f -name '*.ogg' -exec mv -i {} /somedir  \;