On Thu, Mar 16, 2006 at 12:16:56PM +0100, Sander van Dijk wrote: >> -L is POSIX compliant, maybe your findutils are too old. > That is true, -L was added to GNU find somewhere in 4.2.xx. > Debian Sarge has the same issue, since it uses 4.1.20 too.
>> Even OpenBSD 3.7 got -L... But in the end Georg's original > version was >> more portable. > True, and I believe that version should therefore be the default one. > Just because -L is POSIX compliant does not mean it HAS to be used, > especially if it is known to break things on not so uncommon distro's; > the default install should be as failsafe as possible. > I suggest to re-add Georg's version, and leave the find -L one in > wmiirc commented, so that people who want the speed increase and have > a find that can handle it only need to uncomment it. I havent' see Georg's one in the list archives, but the one I posted can be trivially fixed by dropping the -L and changing -type f to \! -type d. The only problem with that is that symlinks to non- -x files and broken symlinks will show up in the list, as the permissions check will be on the symlink (which at least on Linux is always 0777) not the targetted file. On the other hand, the \! -type d form avoids a whole bunch of potential readlinks, at the cost of broken symlinks and unexecable symlinks showing up in the list. So for speed, drop the -L anyway, and use \~ -type d. For _correctness_ with a POSIX find, the -L form is the most accurate. (Well, barring the issue that u+x doesn't imply that _you_ can execute the file, just the file owner. I couldn't solve this one from the GNU find manpage, it has a way which I really doubt is portable.) The main issue to my mind is to avoid multiple find invocations, with a long path that will _really_ add up. -- ----------------------------------------------------------- Paul "TBBle" Hampson, BSc, MCSE On-hiatus Asian Studies student, ANU The Boss, Bubblesworth Pty Ltd (ABN: 51 095 284 361) [EMAIL PROTECTED] "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/ -----------------------------------------------------------
pgprKVg63f3MS.pgp
Description: PGP signature
_______________________________________________ [email protected] mailing list http://wmii.de/cgi-bin/mailman/listinfo/wmii
