Access time of files and directories

My query please:

What I saw how access times of a file and directories work.

1) For a file the access time is the time when I 1st access it after last modification of the file, i.e., if the file is modified at 10 AM and then I access it at 11 AM. After than whenever I access without modifying the file the access time remains same as 11 AM.
while copying a file also the access time doesn't change!! Am I right? What's then the significance?

2) For a directory I had the same experience.

If I don't get the latest time when I accessed, then what's the significance of this type of behavior.

Thanks!

What filesystem mount options are you using? "noatime" is a commonly used one to improve filesystem performance. It improves performance by not recording the access time.

To be more precise, it does not update the access time when a file is read. atime is still updated when a file is written to.

Without noatime, even a read handled by the page cache would require a disk write.

Regards,
Alister

How to know file system mount options?
Thanks Lupin and Alistar

You can look in /etc/fstab to see how the options. You can also type 'mount' to see what is currently mounted and what the options are.

Please assign "Thanks" if you found this helpful. :slight_smile:

I am attaching the output of the commands you have told.
notime command hasn't worked.
Also, how to understand from the output that the feature of updating access time on accessing a file is disabled.

It was 'noatime', not 'notime'. And it's something that belongs in /etc/fstab, it's not something you type in the shell.

Oh I overlooked that. Sorry
Thanks Corona for the clarification