> > to...@tuxteam.de (12023-08-24):
> > > Dunno. I use find nearly every day. Seeing it as "just a recursive
> > > grep" doesn't cover a fraction of its usefulness.
> > >
> > > A couple of days ago I was searching for dangling symlinks.
> > >
> > >   find . -follow -lname "*"

Wow... what a cryptic pair of options this is.  From the man page:

       -L     Follow symbolic links.  When find examines or prints information
        [...]
        Using  -L  causes the -lname and -ilname
        predicates always to return false.

And:

       The -follow option has a similar effect to -L, though it  takes  effect
       at  the  point where it appears (that is, if -L is not used but -follow
       is, any symbolic links appearing after -follow on the command line will
       be dereferenced, and those before it will not).

And:

       -follow
              Deprecated; use the -L  option  instead.   Dereference  symbolic
              links.   Implies -noleaf.  The -follow option affects only those
              tests which appear after it on the command line.  Unless the  -H
              or -L option has been specified, the position of the -follow op‐
              tion changes the behaviour of the -newer  predicate;  any  files
              listed  as  the  argument of -newer will be dereferenced if they
              are symbolic links.  The same consideration applies to -newerXY,
              -anewer and -cnewer.  Similarly, the -type predicate will always
              match against the type of the file that a symbolic  link  points
              to rather than the link itself.  Using -follow causes the -lname
              and -ilname predicates always to return false.

And:

       -lname pattern
              File is a symbolic link whose contents match shell pattern  pat‐
              tern.  The metacharacters do not treat `/' or `.' specially.  If
              the -L option or the -follow option is in effect, this test  re‐
              turns false unless the symbolic link is broken.

So that's two votes for "this can't possibly work" and one vote for
the opposite.  From within the same manual.  Yikes.

(And the POSIX manual doesn't help here, because -lname is a GNU extension.)

Reply via email to