[indiana-discuss] [osol-discuss] why gnu chmod in os2008.11?

Joerg Schilling Joerg.Schilling at fokus.fraunhofer.de
Tue Feb 10 02:46:15 PST 2009


Casper.Dik at Sun.COM wrote:

> >> * A proper find option would be "-filedepth +/-[num]"
> >
> >Unless you are able to explain this, I prefer -maxdepth and -mindepth
> >and  I even implemented it in libfind + sfind three years ago.
>
> All options in find which take a numeric argument, work like this:
>
>
> 	+n   - more than n
> 	 n   -  exactly n
> 	-n   - less than n
>
> (size, ctime/mtime/links/ etc)

What you are talking about in the text above is not an option but something 
that is called a "primary" operator.

"primary" operators are evaluated in the expression interpreter, _options_ are
evaluated elsewhere.

-mindepth, -maxdepth, -xdev are options by not "primary" operators.

Mixing options with "primary" operators is ugly.... but it seems to be OK
to let users see that there is such a difference...

> There is NO numeric argument except when a particular object is identified
> (inum, group, user, etc)
>
> So I believe that the proper option would have been "filedepth"  (depth was
> already taken)
>
>
> 	file -filedepth n  (same as "find -maxdepth n -mindepth n")
> 	file -filedepth -n  (same as "find -maxdepth n-1")
> 	file -filedepth +n  (same as "find -mindepth n+1")

...the name -filedepth does not look like the best choice as it refers to the
directory nesting level "above" the files. 

Jörg

-- 
 EMail:joerg at schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js at cs.tu-berlin.de                (uni)  
       joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily



More information about the indiana-discuss mailing list