Posts Tagged ‘rm’

Sonntag, 3. November 2013

(Aus dem Archiv) Remove file types except those which contain ‚foobar‘

Der vorliegende Artikel habe ich ursprünglich irgendwann einmal ab 2002 auf meinem damaligen Linux-Entwicklungsserver im Web publiziert. Da ich das bloggen erst 2005 entdeckt habe, waren die Tipps in einer grossen HTML-Seite untergebracht. Anlässlich einer Aufräumaktion auf dem Server habe ich mich entschieden, die „Perlen“ über meine heutige Kommunikationsplattform ins Web zu posaunen. Seitdem ich die Artikel verfasst habe, sind viele Tage ins Land gegangen — ob der Artikel noch Gültigkeit hat, entscheidet der geneigte Leser selber.

My linux servers hosts my complete electronic Music Library, sharing it using daapd. All downloads come with a mess of additional files like covers, cue-sheets, nfo-files etc. Usually, I’m too lazy to get rid of’em directly after the download. As time passed by, everything got messed up with every new album I’ve leeched. Instead of going through every directory – and there are many of them – I used another fine find-command to remove anything not an mp3-file within my MP3-Folder:

find . -type f \! -name "*.mp3" -exec rm '{}' ';'

Tags: , ,
Labels: Linux

Keine Kommentare | neuen Kommentar verfassen