public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Lee Rothstein <lee@veritech.com>
To: cygwin@cygwin.com
Subject: Re: Cygwin 'find' does not support the '-L' predicate?
Date: Sat, 05 Sep 2009 04:23:00 -0000	[thread overview]
Message-ID: <4AA1E7AE.20902@veritech.com> (raw)
In-Reply-To: <4AA1E430.9090607@byu.net>

Eric Blake wrote:
> -----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. 
I got the terminiology all wrong but find on my system does not allow -L

Here what works:

    # '-follow' is supposed to be deprecated, but the replacement
    # '-L' specified in 'man' and 'info' pages does not appear to
    # exist in Cygwin 'find' version 4.5.4
    find "$PWD" -maxdepth 1 -type f -follow -executable | gawk '

If I replace '-follow' with '-L' it tells me :

find: unknown predicate `-L'

> Also, it is shorter to use . than
> "$PWD" (for that matter, GNU find has an implicit . if you don't specify a
> directory).
Nope. The line is from a larger script and I need rooted paths.

> 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:
No, I want to find all files whether normal or links that are executable.

Thanks for your help, and sorry about my prior confusion.

The larger script, 'rwhich', finds all commands that match an extended
regular expression.

E.g.:

  $ rwhich '^e_[bm]?s$'
  /local/Scripts/e_bs
  /local/Scripts/e_ms
  /local/Scripts/e_s

It works, now, and I've needed this for a long time. Glad it finally works.


Now, if I can only figure out how not to be bitten by Comcast's
motherlovin' bandwidth throttleing while I'm updating Cygwin. Sigh!

--
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

  reply	other threads:[~2009-09-05  4:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-05  3:50 Lee Rothstein
2009-09-05  4:07 ` find not consistent with man/info pages? Was: " Lee D. Rothstein
2009-09-05  4:08 ` Eric Blake
2009-09-05  4:23   ` Lee Rothstein [this message]
2009-09-05  5:34     ` Christopher Faylor
2009-09-05  6:20       ` Lee Rothstein

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AA1E7AE.20902@veritech.com \
    --to=lee@veritech.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).