Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-02-2007, 11:40 PM   #1
LQ Newbie
Registered: Oct 2005
Posts: 18

Rep: Reputation: 0
How to get the value of miliseconds

What is the command which gives the file creation time in milli seconds.

Presently i am using the command "ls --fulltime -tr filename", this gives the time in hour: mins: secs: milli secs.

But the millisecs field is shown as 00000000. How to get the value in this field.

So please let me know is there an way by which i can get the hour:mins:secs:millisecs fields.

Thanks in advance.
Old 08-03-2007, 01:11 AM   #2
Wim Sturkenboom
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
From man ls:
Unix filesystems store file timestamps only to the nearest second
This implies that you can't get milliseconds.

Last edited by Wim Sturkenboom; 08-03-2007 at 01:12 AM.
Old 08-03-2007, 01:12 AM   #3
Senior Member
Registered: Sep 2005
Location: France
Distribution: approximately NixOS (
Posts: 1,900

Rep: Reputation: 68
Are you sure that your filesystem really retains milliseconds? As far as I rememeber, extended 2/3 retains unix timestamp - which is number of seconds since the Epoch.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
catching a rogue or unknown process that last miliseconds on an "idle system" Emmanuel_uk Linux - Security 3 06-11-2006 04:42 PM
Miliseconds in c ChimpFace9000 Programming 1 06-08-2002 03:49 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:02 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration