Re: how to find executable files

2002-09-25 Thread Peter Leftwich

On Wed, 25 Sep 2002, Erik Trulsson wrote:
 On Tue, Sep 24, 2002 at 07:13:51PM -0400, Peter Leftwich wrote:
  Two questions, first is why doesn't this work, or is there a flag I can use
  with ls?
  # find . -type f -perm +x
  find: -perm: x: illegal mode string
  # find . -type f -perm +x -print
  find: -perm: x: illegal mode string
 For -perm you first use + or - and then the mode.
 The mode is specified as for chmod, i.e. things like 'u+x' for user
 executable, 'g-w' for non-groupwritavle or '+x' for executable by
 somebody. (Numeric modes also work.)

Erg, I knew that!  :-/  It's just that I view the whole u+x scheme as
the easy way and that real Unix junkies roll up their sleeves and use
numeric perm's such as 0777 and 644 :-)

 So in your case you would get:
 find . -type f -perm '++x'
 (The single quotes around ++x seem to be necessary for me.  Probably my
 shell trying to interpret ++ in some way...)

Noted.  Thanks for the tip!

  Question II: Is find always recursive (through subdirectories) or can this
  be limited to x levels down?  Thanks.
 find . -maxdepth 4
 (Or some other number instead of 4. This, along with everything else, is
 fairly clearly documented in the manpage for find(1).)

The manpage (surprise!) is severely lacking and I overlooked it:

  -maxdepth n
  True if the depth of the current file into the tree is less than or equal to n.
  -mindepth n
  True if the depth of the current file into the tree is greater than or equal to n.

That is, it wouldn't kill the author to mention some keyword or buzzword
such as recurse or subdirectories...  Am I alone on this?

 Insert your favourite quote here.

Age is a feeling, not a number!

 Erik Trulsson
 [EMAIL PROTECTED]

--
Peter Leftwich
President  Founder
Video2Video Services
Box 13692, La Jolla, CA, 92039 USA
+1-413-403-9555


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



Re: how to find executable files

2002-09-25 Thread Gary W. Swearingen

Peter Leftwich [EMAIL PROTECTED] writes:

 Erg, I knew that!  :-/  It's just that I view the whole u+x scheme as
 the easy way and that real Unix junkies roll up their sleeves and use
 numeric perm's such as 0777 and 644 :-)

Assuming that you're also referring to the scheme's use in chmod, note
that it can do things the numeric scheme can't do, such as going thru
a dir tree copying the user write bit to the other write bit.

 That is, it wouldn't kill the author to mention some keyword or buzzword
 such as recurse or subdirectories...  Am I alone on this?

Well, I think most people try not to bother others with such doc
problems outside of the Problem Report mechanism, where they won't be
immediately forgotten and have some hope of being of benefit to FreeBSD.
If you don't file a PR, the problem is unlikely to get fixed, leaving
the problem for more people to encounter.  And often, with docs, the
person who thinks there is a problem is in the best position to propose
a fix.  Of course, if your fix proposal leaves hard work for others to
do, it's also unlikely to be fixed, so you have to use judgement, but
there are some people, like Giorgos, who spend some of their time on
such work to improve FreeBSD.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message



how to find executable files

2002-09-24 Thread Peter Leftwich

Two questions, first is why doesn't this work, or is there a flag I can use
with ls?

# find . -type f -perm +x
find: -perm: x: illegal mode string
# find . -type f -perm +x -print
find: -perm: x: illegal mode string

Question II: Is find always recursive (through subdirectories) or can this
be limited to x levels down?  Thanks.

--
Peter Leftwich
President  Founder
Video2Video Services
Box 13692, La Jolla, CA, 92039 USA
+1-413-403-9555


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-questions in the body of the message