I guess I should have been a little clearer. -F requires that ls
stat() every file in the directory. stat() means every file's inode
will be accessed. ie. a lot more disk accesses than just reading the
directory. Andreas Schwab has correctly pointed out that stat()
doesn't update atime for a file. Sorry for the confusion.
If file atimes are changed, that's a bug. Try the following a number
of times, giving the same file as a command line arg.
#include <sys/stat.h>
#include <unistd.h>
#include <stdio.h>
int main(int argc, char *argv[])
{
while (--argc > 0)
{
struct stat buf;
if (stat(*++argv, &buf) == 0)
printf("%ld\n", buf.st_atime);
}
return 0;
}