Find files on linux and move them to a temporary directory

These are the commands to search and move data on linux

-iname – File name search pattern (case insensitive)

Move .mp3 files and not directories, use:

Find all directories having name mp3 and move:

Above commands will not maintain sub-directory structure. Try replacing mv with rsync to use the same directory structure on the target directory.

You need to pass the –remove-source-files option to the rsync command to delete source file.