stealth technology for find(1)

Peter da Silva peter at ficc.uu.net
Thu Aug 24 05:25:20 AEST 1989


In article <5521 at videovax.tv.Tek.com>, bart at videovax.tv.Tek.com (Bart Massey) writes:
>      st_atime    Time when file data was last accessed.  Changed
>                  by the following system calls: mknod(2),
>                  utimes(2), and read(2).  For reasons of effi-
>                  ciency, st_atime is not set when a directory is
>                  searched, although this would be more logical.

This means:

	% cat /usr/fred/project/wheaties/raisins
					 ^^^^^^^-- This file is read.
	      ^^^^^^^^^^^^^^^^^^^^^^^^^^-- These directories are *searched*.
					   for reasons of efficiency, atime
					   is not modified.
	% ls /usr/fred/project/wheaties
	     ^^^^^^^^^^^^^^^^^------------ These directories are searched.
			       ^^^^^^^^--- This directory is *read*. That is,
					   it is opened and the read(2) sys
					   call is performed (maybe multiple
					   times). This is of course hidden
					   in the directory access routines.

A directory being searched has a specific meaning in UNIX: it's what namei
does to resolve a path. Find actually opens and reads the directory.
-- 
Peter da Silva, *NIX support guy @ Ferranti International Controls Corporation.
Biz: peter at ficc.uu.net, +1 713 274 5180. Fun: peter at sugar.hackercorp.com. `-_-'
"export ENV='${Envfile[(_$-=1)+(_=0)-(_$-!=_${-%%*i*})]}'" -- Tom Neff     'U`
"I didn't know that ksh had a built-in APL interpreter!" -- Steve J. Friedl



More information about the Comp.bugs.4bsd.ucb-fixes mailing list