i cant change the access time of any file i create.
i tried the touch -a
, touch -ad
, touch -t
commands, but the access time in the stat
utility stays the same.
Can you please help me to modify the access time of the file, and the change time [if possible].
Thank You.
1 Answer
Ubuntu, depending when/how you installed it, uses relatime
or noatime
mount options by default - this means that tracking of access times is basically disabled.
You can change it by removing that option from /etc/fstab
and rebooting. Or, for instance
sudo mount -o remount,atime /home
on the relevant filesystem.
sync
through the terminal before usingstat
grep atime /etc/fstab
.touch
changes mtime, so it should work, what exact command are you running?