behavior of file(1) in AIX PS/2 v1.1

Guy Harris guy at auspex.auspex.com
Wed Sep 26 03:38:19 AEST 1990


>The notion that "file" should modify the access time makes perfect
>sense to me; the notion that updating the access time should cause the
>change time automatically to be updated does not.  This betrays my own
>prejudice that one must access a file first in order to modify or
>change it - in this state of affairs, the access time and change time
>would be synonymous.

"Change" in the phrase "change time" in UNIX has a fairly specific
meaning; it refers to a change to the contents of the inode (or its
moral equivalent on UNIX file systems, if any, that don't have inodes),
with the exception of a change to the access time caused by actually
reading the file.  "Access" also has a fairly specific meaning; it
refers to reading the data of a file.

So you don't have to "access" a file in order to "change" it - doing a
"chmod()" call on the file will "change" it (i.e., modify its inode) but
not "access" it (i.e., not read any data from it).

>I know I'm betraying my ignorance here, but I'll ask anyway:  what do
>people find the "change" time useful for?

It's used by dump programs, so that they'll dump a file (or, at least,
its inode) even if the *contents* of the file haven't changed, if the
permissions or owner or... have changed.

Presumably, the reason why the change time is updated if some program
explicitly sets the access time (as the S5 "file" does), is so that the
change to the access time gets recorded on the next dump.  The reason
why it's not updated when the access time is updated when the file is
read is that dumps would take a *lot* more space if it were....



More information about the Comp.unix.aix mailing list