Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Let's run mount

/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sdb1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/sda1 on /media/1 type ext3 (rw,nosuid,nodev,uhelper=udisks)

there is nothing in these lines that show either

 atime
 or
 noatime

the problem here is, i created folders a and b and then tried accessing them, but i can not get them to update Access Time so i can arrange them based on access time.

how exactly does one ensure the "filesystem" of the "operating system" is mounted with "atime" enabled ?

share|improve this question
    
You created folders a and b on which filesystem/mount? –  Patrick Aug 31 '13 at 5:09
    
@Patrick, i want to see it work really, i created them on desktop, but i could create them on the usb device also. which is the last line. –  user249775 Aug 31 '13 at 5:14
    
It would appear that your /home directory is ext4. I still think it's something to do with atime but the mount output would appear to be on the up and up. The answer is most likely not the: "you need X in your /etc/fstab" or you need to mount it with "atime" variety. –  slm Aug 31 '13 at 5:27

3 Answers 3

up vote 0 down vote accepted

The mount output would show noatime if atime were disabled.

Perhaps the problem with atime is due to a filesystem that does not support it?

share|improve this answer
1  
With recent-ish kernels and mount (I forget when this changed), relatime is the default, and does no show in the mount output. You have to mount with the strictatime option to get the old behavior with fully working atime. –  Gilles Aug 31 '13 at 11:09
    
Ah, that's good to know Gilles. –  ash Aug 31 '13 at 19:02

By default, since Linux 2.6.30, filesystems are mounted with the relatime mount option. With this option, the atime is not updated when it is equal to the mtime. This is only if the atime option is enabled (which it is by default): under noatime, the atime is not updated, ever. This saves on disk writes at the expense of removing a useful feature.

The kernel reports relatime in /proc/mounts, but the mount utility suppresses this option from its output (because it's the default setting) since util-linux 2.13.

To fully enable access times, you need to mount the filesystem with the strictatime option.

share|improve this answer

In /etc/fstab the 4th column contains the options that you want to pass the mount command for each mount.

So for this filesystem you could just append the option atime into the 4th column of /etc/fstab, then you do a remount the block device like mount -o remount <mount point>.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.