Linux文件时间的种类及含义
Linux文件时间的种类及含义
在Linux操作系统中,每个文件都有三种不同类型的时间戳,分别是访问时间(atime)、修改时间(mtime)和改变时间(ctime)。这三种时间戳记录了文件在不同操作下的变化,下面将详细解释它们的含义并提供相应的代码示例。
示例代码:
touch test.txt ls -l test.txt 1. 输出:-rw-r--r-- 1 user user 0 Apr 1 10:00 test.txt cat test.txt ls -l test.txt 1. 输出:-rw-r--r-- 1 user user 0 Apr 1 10:01 test.txt登录后复制