How to get file modification time in seconds/milli-seconds?

How to get file modification time in seconds/milli-seconds?

Post by Guangrong Xin » Tue, 08 Jun 1999 04:00:00



Usually, when we issue a command:
    ls -l
we can only get file modification time in format of 'Month Day
Hour:Minute' for those modified within 6 months. Does anybody know
anyway to list file modification time in seconds/milli-seconds? i.e.,
show time in format: 'HH:MM:SS.sss'.

Thanks!

 
 
 

How to get file modification time in seconds/milli-seconds?

Post by Barry Margoli » Tue, 08 Jun 1999 04:00:00




Quote:>Usually, when we issue a command:
>    ls -l
>we can only get file modification time in format of 'Month Day
>Hour:Minute' for those modified within 6 months. Does anybody know
>anyway to list file modification time in seconds/milli-seconds? i.e.,
>show time in format: 'HH:MM:SS.sss'.

Use something other than ls, such as Perl.  GNU ls offers output
customization, so it may provide a way to see the seconds.

You won't be able to see milliseconds, since Unix only stores file times
with 1 second precision.

--

GTE Internetworking, Powered by BBN, Burlington, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

 
 
 

1. getting the difference in modification time of two files

Hello all,

I'm trying to get the difference of modification time between two files.
For example, I've got file 1 which was modified the 1st of june 2000, at
01:01:33 and file 2 which was modified at 3rd of july, 2000, 15:36:46.
I want to have the result either in dd/hh:mi:ss format or in minutes. Thus I
would get 32/14:35:13
The constraints are the following ones:

1. the script must be a standard shell (posix shell, ksh, csh) shell
2. the script must run on any SystemV unix

A workaround would be to have the time ellapsed since the epoch on any given
file, but I don't know how to do that.

Thanks to all in advance,

FiX

2. where to find XFree86 3.2a

3. Why do usleep(), delay() allways wait 10 Milli-Seconds?

4. /dev/null busy when used for printer OW fails

5. measuring milli-seconds on multi-user Sparc 2

6. Linux & Compaq docking LCD/CRT switching ??

7. how to show the file modification time into seconds

8. SMP with APM

9. calculate time difference to the milli second

10. Run time measurement with micro (or at least milli)-second resolution help please

11. Linux Time in milli seconds

12. Getting creation time (in seconds) of a file

13. How to trigger two programs on two different machines at the same time?