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.

And in the name of diversity, here's yet another way to do it (because
there's *always* another way to do it in Linux):

find /path/to/windows/files -type f -iname thumbs.db | while read FILE ;
do rm "${FILE}" ; done

find's -exec is handy, but program-specific.  "while read" is nice and
generic, and can be used with heaps of other stdout outputs too.

And of course you could do it the GUI way - Places -> Search for
Files... do your search, and delete the results found.  But that's
nowhere near as fun as the command line.

-Dan

-- 
ubuntu-au mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-au

Reply via email to