This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Cygwin 'find' does not support the '-L' predicate?
- From: Eric Blake <ebb9 at byu dot net>
- To: cygwin at cygwin dot com, lee at veritech dot com
- Date: Fri, 04 Sep 2009 22:08:16 -0600
- Subject: Re: Cygwin 'find' does not support the '-L' predicate?
- References: <4AA1DFE9.9070803@veritech.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Lee Rothstein on 9/4/2009 9:50 PM:
> The following, which I assume (according to man and info) will
> find executables that are links, does not work at all:
>
> find -L "$PWD" -maxdepth 1 -type f -executable
>
> Or, is this pilot error?
Pilot error. -L works just fine. Also, it is shorter to use . than
"$PWD" (for that matter, GNU find has an implicit . if you don't specify a
directory). I think you're asking the wrong question, though - if what
you really want is to find all symlinks whose targets are executables, try
this:
find -P -maxdepth 1 -type l -xtype f -executable
- --
Don't work too hard, make some time for fun as well!
Eric Blake ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkqh5DAACgkQ84KuGfSFAYATaACgpJXCp62sjsqJcGDIWHJGJe0t
eMEAniL1bKVglLYepAXD701/Yk0hpqGJ
=tJOl
-----END PGP SIGNATURE-----
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple