solaris中ls命令的日期格式

时间:2014-08-07 15:14:05

标签: unix command

我正在使用此命令列出我服务器上目前与linux服务器一起正常工作的所有文件和目录

ls -l1h --time-style=+"|%Y-%m-%d %H:%M:%S|" /directory/path

的Linux

$ ls -l1h --time-style=+"|%Y-%m-%d %H:%M:%S|" /directory/path
total 40K
-rwxrwxr-x 1 mercury mercury  413 |2014-08-06 16:30:10| df_command.sh
-rwxrwxr-x 1 mercury mercury  430 |2014-08-06 16:30:10| DisplayCrontab.sh
-rwxrwxr-x 1 mercury mercury  743 |2014-08-06 16:30:10| du_command.sh
-rwxrwxr-x 1 mercury mercury  404 |2014-08-06 16:30:10| ipcs_command.sh
-rwxrwxr-x 1 mercury mercury  438 |2014-08-06 16:30:10| netstat_an_command.sh

上述ls命令的solaris等效命令是什么?

到目前为止,我找到了ls -1lhE命令

的Solaris

 $ ls -1lhE /directory/path
 total 160
 -rwxrwxr-x   1 mercury  mercury      446 2014-08-05 15:25:52.192502839 +1000 DisplayCrontab.sh
 -rwxrwxr-x   1 mercury  mercury      428 2014-07-28 20:01:28.979863166 +1000 TraceIpRoute.sh
 -rwxrwxr-x   1 mercury  mercury      929 2014-07-28 20:01:56.978851544 +1000 Wait_KeepAlive.sh
 -rwxrwxr-x   1 mercury  mercury      456 2014-07-28 20:02:13.491979595 +1000 df_command.sh
 -rwxrwxr-x   1 mercury  mercury      940 2014-07-28 20:02:38.131073589 +1000 du_command.sh
 -rwxrwxr-x   1 mercury  mercury      417 2014-07-28 20:03:13.427164492 +1000 ipcs_command.sh
 -rwxrwxr-x   1 mercury  mercury      453 2014-07-28 20:03:31.995031188 +1000 netstat_an_command.sh

即使我从上面的输出中删除了纳秒,我仍然在输出中有这个+1000

是否有任何格式的ls命令可以从中获得与我在linux上相同的输出?

0 个答案:

没有答案