Hush script to recurse through file system?
Harald Becker
ralda at gmx.de
Sun Jun 19 17:44:37 UTC 2011
Hi!
>>> find / -xdev -type f -print0 | xargs -0 readelf -d
>> FYI: This is more efficient than using a pipe:
>>
>> find / -xdev -type f -exec readelf -d '{}' 2>/dev/null \;
> In which way should this be more efficient?
Your question is the reason I kept the pipe version in my suggestion. As
far as I know does xarg execute the command only once with many
arguments on a single command line. This can be much faster than
invoking the same program many times with only one argument. So why
shall "-exec" be much more efficient (except removing the pipe)?
--
Harald
More information about the busybox
mailing list