Linux view file time accurate to seconds

  
        

When viewing files under Linux, ls –l defaults to no seconds:

Java code

-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

To display seconds (actually more precise), use the –full-time parameter:

Java code

-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

To display more information, use the stat command

Java code

#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

Copyright © Windows knowledge All Rights Reserved