View Single Post
Old 04-13-2008, 11:50 AM   #12 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 595
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
Find - exec is much slower than find |xargs rm, because in the case of n files find -exec will invoke rm n times whereas find|xargs will only invoke rm n mod <max commandline args> times, so you see a major speed up in terms of process invocation overhead.

The ultimate power combo is find -print0|xargs -0 rm -f
It uses null characters rather than whitespace to separate the output/input so it won't break in the face of files with spaces or newlines embedded in the names.
__________________
Stop intellectual property from infringing on me
teknomage1 is offline   Reply With Quote