Linux 下查看文件時,ls –l 缺省是不顯示秒的:
Java代碼
-rw------- 1 root root 1463 Jul 25 2012 anaconda-ks.cfg
-rw-r--r-- 1 root root 11 Feb 22 14:38 demo
drwxr-xr-x 2 root root 4096 Jul 25 2012 Desktop
-rw-r--r-- 1 root root 36008 Jul 25 2012 install.log
-rw-r--r-- 1 root root 4939 Jul 25 2012 install.log.syslog
drwxr-xr-x 2 root root 4096 Feb 22 15:15 jms
-rw------- 1 root root 46033 Oct 29 10:00 mbox
要顯示秒(實際更精確),可以用 –full-time 參數:
Java代碼
-rw------- 1 root root 1463 2012-07-25 12:56:42.000000000 +0800 anaconda-ks.cfg
-rw-r--r-- 1 root root 11 2013-02-22 14:38:56.000000000 +0800 demo
drwxr-xr-x 2 root root 4096 2012-07-25 21:17:04.000000000 +0800 Desktop
-rw-r--r-- 1 root root 36008 2012-07-25 12:56:31.000000000 +0800 install.log
-rw-r--r-- 1 root root 4939 2012-07-25 12:53:11.000000000 +0800 install.log.syslog
drwxr-xr-x 2 root root 4096 2013-02-22 15:15:24.000000000 +0800 jms
-rw------- 1 root root 46033 2012-10-29 10:00:29.000000000 +0800 mbox
要顯示更多信息,用 stat 命令
Java代碼
#stat jms
File: `jms'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: fd00h/64768d Inode: 16253060 Links: 2
Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2013-02-22 15:15:24.000000000 +0800
Modify: 2013-02-22 15:15:24.000000000 +0800
Change: 2013-02-22 15:15:24.000000000 +0800