Cleaning up my MP3 directory using the find command

I’ve just wrote a quick bash script to delete all the Thumbs.db and desktop.ini using the find command, from my MP3 collection on my home linux box.

I also found some nice bash script sites in the process.

#!/bin/sh #-------------------------------------------------------# # Filename clean-mp3 # # # # A script written to delete the Thumbs.db and # # the folder.ini files created by MS Windows # # from my MP3 music collection. # # # # New 14/6/2011 # # Now removes Mac .DS and ._ files. # # # # Located in /home/billy/ # # Created on 11/03/2008 by Billy Dickson # # # #-------------------------------------------------------# # Exit on error set -o errexit export PATH=/usr/local/bin:/usr/bin:/bin find . \( -name "Thumbs.db" -o -name "desktop.ini" -o -name "._*" -o -name ".DS*" \) -exec rm {} \;

About billy

Senior IT Technician working in Edinburgh, Scotland.
This entry was posted in Linux, Personal and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>