Subject: Re: file(1) resetting access times
To: None <ghudson@MIT.EDU>
From: Greg A. Woods <email@example.com>
Date: 07/13/1995 10:34:29
[ On Thu, July 13, 1995 at 00:02:21 (-0400), firstname.lastname@example.org wrote: ]
> Subject: file(1) resetting access times
> file(1) tries to reset the access time of the file it reads. This has
> at least four adverse effects when successful:
> Can anyone come up with any justification for this "feature"? It was
> in the first revision of file.c in the CVS tree. If no one can come
> up with a reason why anyone would want to be there, I'll just check in
> a change removing the utime() code.
I'd call it a mis-feature for all the reasons you listed, plus one more
-- file(1) hints that it reads the object(s) to perform various of the
tests, and yet does not seem to indicate that it tries to reset the
access time of the object being tested.
If I know that anything reads a file, then I do expect the access time
to be updated.
My guess is this "feature" was added since the most common use of
file(1) is to do "file *", thus often obliterating any access time
settings in the directory. However, why would this be considered
different from "grep foo *"?
Greg A. Woods
+1 416 443-1734 VE3TCP robohack!woods
Planix, Inc. <email@example.com>; Secrets Of The Weird <firstname.lastname@example.org>