[BusyBox] find wish list

Matt Kraai kraai at alumni.carnegiemellon.edu
Tue Feb 6 16:53:23 UTC 2001


On Tue, Feb 06, 2001 at 07:35:37AM -0800, Matt Kraai wrote:
> On Tue, Feb 06, 2001 at 08:11:39AM -0600, ssrat at mailbag.com wrote:
> > I was looking at the find command, and trying to see what I could use 
> > (ie, what I MISSED) and what I would use it for.  This is in relation 
> > to -type .....
> > 
> > I thought of three things for -type and some more predicates... I've 
> > ranked them in terms of "I wouldn't miss it" (0) to "I GOTTA HAVE 
> > IT!" (5)....
> > 
> > 4: -type d          * find directories; speed up some searches?
> > 5: -type f          * FREQUENTLY useful...
> > 2: -type l          * maybe....
> 
> The patch I posted earlier adds support for all of the types
> supported by GNU tar under the BB_FEATURE_FIND_TYPE option.
> 
> > 4: -perm -400       * security
> > 3: -perm +111       * find executables
> > 1: -perm 400        * completeness?  or not?
> 
> This should be relatively easy to add as well.
> 
> > 1: -mtime +4        * older than 4 days
> > 1: -mtime -4        * within four days
> 
> As should this.
> 
> I'll code up a patch to address all these issues as circumstances
> permit.

OK, here is a patch to add support for the above (as I understand
them).  It is against CVS, and is completely untested.  I never
even compiled it.  If someone could look at it and let me know
what the problems are (I already know that it doesn't handle 0
arguments to the perm and mtime options well), I'd appreciate it.

Matt





More information about the busybox mailing list