我试图知道是否在文件系统上设置了 relatime 或 noatime,但我没有在 /etc/fstab 中找到信息,也没有在内核启动选项中找到。
首先,很明显我没有“正常”的行为:
root@antec:/tmp# rm -f test.txt; echo a>test.txt
root@antec:/tmp# stat test.txt | \grep -i 2011
Access: 2011-08-01 21:54:30.000000000 +0200
Modify: 2011-08-01 21:54:30.000000000 +0200
Change: 2011-08-01 21:54:30.000000000 +0200
root@antec:/tmp# cat test.txt > /dev/null
root@antec:/tmp# stat test.txt | \grep -i 2011
Access: 2011-08-01 21:54:53.000000000 +0200
Modify: 2011-08-01 21:54:30.000000000 +0200
Change: 2011-08-01 21:54:30.000000000 +0200
root@antec:/tmp# date
Mon Aug 1 21:55:00 CEST 2011
root@antec:/tmp# cat test.txt > /dev/null
root@antec:/tmp# stat test.txt | \grep -i 2011
Access: 2011-08-01 21:54:53.000000000 +0200 …Run Code Online (Sandbox Code Playgroud)