Favourite linux single line command…
August 11th, 2009
1 comment
Whenever you have pesky windows users on your network, your file system on any servers running samba start to gain extra, silly, “Thumbs.db” files.
If you’re like me and hate the things with a vengeance, you can get rid of every single one of them using the linux command line below.
updatedb;for i in `locate Thumbs.db|sed 's/ /\__/g'`;do rm -vf "`echo $i | sed 's/__/\\ /g'`";done;
Update 21 Oct 2009: added for loop with sed commands to safety handle spaces, round brackets and single quotes etc. in the file path