Answers:
您可以使用tune2fs来获取信息
tune2fs -l /dev/devicetocheck | grep "Last Checked"
同样,您可以获得安装数量
tune2fs -l /dev/devicetocheck | grep "Mount Count"
如果使用lvm
tune2fs -l /dev/sda5 | egrep -i "mount count|Check interval|Last|Next"
将失败:
tune2fs: Bad magic number in super-block while trying to open /dev/sda5
人们将不得不这样做:
tune2fs -l /dev/hostname-vg/root | egrep -i "mount count|Check interval|Last|Next"
Last mounted on: /
Last mount time: Wed Sep 4 17:45:12 2019
Last write time: Wed Sep 4 17:45:10 2019
Mount count: 20
Maximum mount count: -1
Last checked: Fri Aug 30 16:09:19 2019
Check interval: 0 (<none>)