My grandmother yelled: “Those damned mosquitoes”. She grabbed the “FLIT”, she sprayed in every corner of the bedroom where I was ready to go to sleep. After “The Flit” I slept like a rose (Dutch-ism). I haven’t seen them for 50 years since the emergence of the modern spray can. As a memorial, you will find a small Cygwin / Linux script for exterminating “Thumbs.db” on your hard disk.
Put this in a file
flit.sh somewhere, like desktop or home, make it executable and modify to taste…
#!/bin/bash find /data \( -name 'Thumbs.db' -or -name 'desktop.ini' -or -name 'Thumbs.db:encryptable' -or -name '.DS_Store' \) -print0 | xargs -0 rm -rf
findfinds (recursive) the files between escaped parenthesis
\(...\)and lists the files (
print0) in directory
/data. Output is piped to
xargsthat takes care of removal (
rm). The zero’s deal with file names with spaces.
- It is one of many possible approaches, but what I like about this approach is that you can check output first, by running it in a shell without
| xargs -0 rm -rf.
- A DOS batch file named
flit.cmdcould be something like:
@echo on C: cd /installers del /s /q /f Thumbs.db desktop.ini .DS_Store Thumbs.db:encryptable echo Finished FLIT.cmd pause