Remove Windows Thumbs.db Files

Dave Hall dave.hall at
Sat Nov 8 04:16:13 GMT 2008

On Sat, 2008-11-08 at 07:28 +1000, Daniel Mons wrote:
> Dave Hall wrote:
> > First bit of advice - never trust anyone telling you to run "rm -rf"
> *snip*
> > find /path/to/windows-files -iname thumbs.db -exec rm -rf {} \;
> Technically speaking there is no reason to need the "-r" (recursive)
> flag with "rm" when using "find" to find and delete files (as "find"
> itself is recursive).  You can also tell "find" to look for files only
> with the -type flag, which is recommended in the name of safety and sanity.

I rarely use windows these days and forgot Thumbs.dbis a file not a
directory - it was late on a Friday :).

You are right, as it is a file the -r isn't needed in this case.  If
removing directories the -r is needed to remove the contents of the
directory first.



More information about the ubuntu-au mailing list