2011-11-09 00:47:57 +0000 2011-11-09 00:47:57 +0000

答案 (6)

解决方案找到了!

得分 199
2011-11-09 01:02:33 +0000

你的ls版本是否支持--time-style选项?如果支持:

ls -la --time-style=full-iso blah

-rw-r--r-- 1 root root 0 2011-11-08 18:02:08.954092000 -0700 blah
```。
Advertisement
得分 98
2015-10-10 09:13:24 +0000

更简单的方法是:

ls --full-time

这等于

ls -l --time-style=full-iso

如果你想把条目显示为.开头的隐藏文件,请添加-a。

ls --full-time -a
Advertisement
得分 39
2015-11-12 00:44:55 +0000
Advertisement

对于 OS X 来说,似乎你能得到的最好的结果是:

ls -l -T

。

0x1&

从10.10.5上的ls(1) manpage:

-T 与-l(小写字母``ell’‘)选项一起使用时,显示文件的完整时间信息,包括月、日、时、分、秒和年。

得分 20
2014-07-25 21:28:48 +0000

如果"-time-style=full-iso “的输出对你来说太过详细,你可以使用像日期命令一样的自定义格式。

ls -l --time-style=+"%b %d %Y %H:%M:%S" blah
-rw-rw-r-- 1 root root 0 Feb 03 2014 01:13:01 blah
Advertisement
得分 3
2014-11-10 09:50:02 +0000
Advertisement

关于man ls指令,只需ls -e就可以了!

得分 1
2015-10-23 10:23:11 +0000

对于FreeBSD来说,它应该是。

ls -la -D %Y-%m-%dT%H:%M:%S