小编use*_*507的帖子

如何知道 noatime 或 relatime 是否是内核中的默认挂载选项?

我试图知道是否在文件系统上设置了 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)

linux filesystems kernel stat

19
推荐指数
1
解决办法
2万
查看次数

标签 统计

filesystems ×1

kernel ×1

linux ×1

stat ×1