Finding files modified "today" (Was: Awk with passed parameters)

Jay Plett jay at silence.princeton.nj.us
Sat Mar 30 11:40:59 AEST 1991


In article <1991Mar29.185347.6657 at iwarp.intel.com>, merlyn at iwarp.intel.com (Randal L. Schwartz) writes:
< In article <686 at silence.princeton.nj.us>, jay at silence (Jay Plett) writes:
< | I have added several primitives to gnu find and sent the sources off
< | to gnu.  If gnu likes them, they should be available in a future
< | release.
< [...]
< |      -gid n
< |           File's gid matches n.
< [...]
< |      -uid n
< |           File's uid matches n.
< 
< Whoa!  You mean that GNU find doesn't implement the standard -user and
< -group, which handle numeric IDs just fine?  (Or have I been playing
< with a non-V7 find for too long?)

Thanks for posting the question.  I've had several private e-mails asking
the same question, but was too shy to post an unprovoked followup :-).

gnu find, like all the others, has -user and -group and they can handle
numeric [ug]ids.  But `n' has a specific defined meaning in the find
documentation:

     Numeric arguments can be specified as
     +n   for greater than n,
     -n   for less than n,
     n    for exactly n.

Thus:
	find . -uid +100 -print
for example, lists those files owned by a uid > 100.  This is a different
facility than that provided by "-user _uid_".

	...jay



More information about the Comp.unix.questions mailing list