如何在Unix文件中查看时间戳

5

UNIX文件系统中的文件有3种时间戳:访问、修改和更改。为了调查这个问题,我创建了一个文件,想要查看时间戳。有人知道如何查看不同的时间戳吗?然后,哪些命令可以查看时间戳。


还有,我想知道哪个命令可以更改时间戳。 - Elham abbasi
2个回答

9
使用 stat 命令:
stat filename

bash: stat: command not found 如果我们没有stat命令会怎样? - javaPlease42

3

要更改atimemtime,请使用touch命令:

touch --time=atime -t 198805232211.45
touch --time=mtime -t 205012300945.30

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接