access(2) vs. st_atime

Frederick M. Avolio avolio at decuac.UUCP
Fri Jan 3 23:23:21 AEST 1986


In article <6002 at elsie.UUCP>, ado at elsie.UUCP (Arthur David Olson) writes:
>     ls -lu /usr/spool/uucppublic/.hushlogin
>     -rw-r--r-- 1 uucp          0 Mar  6  1984 /usr/spool/uucppublic/.hushlogin
> Now granted, doing an "stat" call on a file ought not change the access
> time of the file ...  However...shouldn't an "access" change the "last
> access" time for the file?

Access(2) is used to "determine the accessibility of a file" (from the
Ultrix-32 manual).  So, like stat(2) et al. it does not open the file, but
reads the inode information and, in the case of access(2), lets the user
know if the file is accessible in the mode requested.  It does not
try to access the file.
-- 
Fred @ DEC Ultrix Applications Center    {decvax,seismo,cbosgd}!decuac!avolio



More information about the Comp.unix mailing list