linux – Move all files in Subfolders to one location – recursively

generic:
first, find all files recursively (not directories) beginning from the actual directory:

find . -type f

then move those files after they have been found:

find . -type f -exec mv \{\} . \;



 



for mp3:


find /path/to/mp3s -name *.mp3 -exec mv \{\} /path/to/target/dir \;

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s