与时间相关的命令

hwclock --show: show hardware time

hwclock --hctosys: use hardware clock to set sys time

hwclock --systohc: use system time to set hardware time

in fedora vmware virtual machine, there is 8 hours difference between system and hardware time.

VMware安装的虚拟机挂起后系统时间和硬件时间不同步的解决方法

类Unix系统中,文件的atime, ctime 和 mtime三个时间

atime: access time

If you read data of file, atime updated. ATTENTION: Sometimes, atime won't get updated realtime because of IO efficiency consideration.In this page, see sammyg's answer. Or just see mount's manpage and search the word 'relatime'

atime is the file access time. The atime gets updated when you open a file but also when a file is used for other operations like grep, sort, cat, head, tail and so on. ls will not update atime(I think ls read file's attribute, but not data).

ctime: change time

If you change file's attribute(chmod, etc. )ctime is the inode or file change time. The ctime gets updated when the file attributes are changed, like changing the owner, changing the permission or moving the file to an other filesystem but will also be updated when you modify a file.

mtime: modify time

If you modify file's data, mtime get updated. mtime is the file modify time. The mtime gets updated when you modify a file. Whenever you update content of a file or save a file the mtime gets updated.