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.) 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...) > > 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).) > > -- > 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 -- <Insert your favourite quote here.> Erik Trulsson [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message