On Tue, Mar 14, 2006 at 08:27:10PM +1100, Paul TBBle Hampson wrote:
> So how about:
> find -L `echo "$PATH" | tr ':' ' ' ` -perm -u+x -type f -print | sed 's,^.*/,,' | sort -u
> Only one find run, against all the paths at once... find is specified to
> not visit the same directory twice anyway, so we save a uniq/sort call.
Ignore that paragraph, I misread the manpage due to being on crack or
something.
find -L `echo "$PATH" | tr ':' '\n' | sort -u` -perm -u+x -type f -print | sed 's,^.*/,,' | sort -u
> Hmm, only 5 invocations. That should help with the often-mentioned-here
> overhead of ld-linux.so dynamic linking.
Dang, now 6 again. I think it's still better than invoking find for each
directory in the path...
-- ----------------------------------------------------------- Paul "TBBle" Hampson, BSc, MCSE On-hiatus Asian Studies student, ANU The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361) Paul.Hampson_AT_Anu.edu.au "No survivors? Then where do the stories come from I wonder?" -- Capt. Jack Sparrow, "Pirates of the Caribbean" License: http://creativecommons.org/licenses/by/2.1/au/ -----------------------------------------------------------
This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 16:01:10 UTC