如何使用 stat 获取文件的修改日期和时间?

F.N*_*Ndr 2 unix shell stat

我使用Stat命令查找文件的最后修改日期,结果是:

\n\n
File: \xe2\x80\x98first.php\xe2\x80\x99\n      Size: 145         Blocks: 8          IO Block: 4096   regular file\n    Device: 801h/2049d  Inode: 1771067     Links: 1\n    Access: (0664/-rw-rw-r--)  Uid: ( 1000/      fn)   Gid: ( 1000/      fn)\n    Access: 2017-02-28 12:44:32.853785914 +0330\n    Modify: 2017-02-27 23:22:11.280625946 +0330\n    Change: 2017-02-27 23:22:11.344625946 +0330\n     Birth: -\n
Run Code Online (Sandbox Code Playgroud)\n\n

我应该使用什么命令来仅first.php 2017-02-27 23:22:11.280625946 +0330在输出中显示?

\n

cev*_*ing 5

尝试阅读手册页:

man stat
Run Code Online (Sandbox Code Playgroud)

然后使用格式选项:

stat -c '%n %y'
Run Code Online (Sandbox Code Playgroud)