From: Thomas L. <ta...@ec...> - 2002-10-31 10:43:46
|
On Tue, Oct 29, 2002 at 12:37:07PM -0500, Keith R. John Warno wrote: [...] > Non-Rox solution: > > $ # from top of tree you want to touch > $ find . -print0 | xargs -rx0 -- touch > > The beauty here is that -- as long as the resulting command line that > xargs runs isn't too large ( < about 20k ) -- the pipeline will only > require 3 process IDs which is very efficient (as opposed to N+1 where N > is the number of files found, as in the very poor example: find . -exec > touch '{}' \;). Which brings me to the ROX-related question: the Find > with system(touch %) excutes touch for each file the Find finds, or for > all the files (as in the pipeline example)? Oh wait, nevermind. "% in > 'command' is replaced with the path of the current file". Hrmm. Not > very efficient; that's a lot of execvp()ing (I sure as heaven hope ROX's > 'Find with system()' doesn't use a libc system() call. Haven't looked > at the source but if it does use a libc system().... ewwwwww.) It does what it says ;-) For 900 files it doesn't make much difference. What is needed is a way to process/save the files found... -- Thomas Leonard http://rox.sourceforge.net ta...@ec... ta...@us... GPG: 9242 9807 C985 3C07 44A6 8B9A AE07 8280 59A5 3CC1 |