Cleanup of scattered .mp3’s files to a Music directory

messyI’ve close to thousands of mp3 files scattered across various directories and sub-directories. I wanted to listen to one of my favorite songs but could not find it for close to 2 hours. Later, I thought to switch to youtube and enjoyed to the tunes.

But this stuck to my mind and made me to cleanup my messy @Debian #Linux desktop. As you know there are thousands of file lying around whilst given the fact that I’m very lazy to manually move files. After #googling around multiple sites; was able to prepare a command which would suffice my requirement.

find / -iname “*.mp3” -type f -print0 | xargs -0 -I ‘{}’ /usr/bin/rsync -avR –remove-source-files “{}” /home/vin/Music/Songs/


Now you know the trick… Simply replace “*.mp3” with your search criteria to better organize your stuff!


Leave a Reply

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

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

Google photo

You are commenting using your Google 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 )

Connecting to %s