--On Thursday, July 15, 2004 03:15:24 PM -0400 Nathan Conrad <[EMAIL PROTECTED]> wrote:

You need a semicolon at the end:

find /home/directory/ -name thumbs.db -exec rm -rf {} \;

Be careful with -rf. You should only need the -f in this case.

Agree with the caution on the '-r'... xargs works well for something like this as well:


        find /home/directory/ -name thumbs.db | xargs -t rm

The '-t' to xargs let's you see the command roll by. In this case it is probably not really helpful but I have had instances where I had to find and delete 1000's of files. It is noticeably faster to use xargs and call rm with a long command line rather than call rm for the files one by one.

--
Dan
--
TriLUG mailing list        : http://www.trilug.org/mailman/listinfo/trilug
TriLUG Organizational FAQ  : http://trilug.org/faq/
TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
TriLUG PGP Keyring         : http://trilug.org/~chrish/trilug.asc

Reply via email to