Review your favorite Linux distribution.
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 03-26-2003, 08:57 PM   #1
LQ Newbie
Registered: Mar 2003
Location: Oz
Posts: 1

Rep: Reputation: 0
Unhappy creation date of file using the 'ls' command

I suspect I am missing something fundamental here so apologies for not RTFM'ing in the right places but I can not seem to find this one.

I would like to be able to list the creation date of a file using the 'ls' command. Some of the docuentation, including the Red Hat stuff, appears to suggest that

ls -la

gives the creation date of a file. I have, however, done some testing using vi and the touch command and it appears that the default of "ls -l" is actually ctime or last modified time.

I would like to know how to find the creation date and time of a file using ls or, indeed, any other command.

Thanks in advance any enlightning advice.

Old 03-27-2003, 01:34 AM   #2
Senior Member
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 49
There are three time stamps that a files keeps track of:

status change        (ls -c)
last modification    (ls)
last access          (ls -u)
The status change time (also called change time by stat(2)) is your
best bet, but it is only valid if the status of the file hasn't changed
since its creation.

read the man pages:

Last edited by moses; 03-27-2003 at 01:35 AM.


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
How to paginate in the 'LS' command? jhecht Linux - Software 10 04-13-2010 07:15 AM
Finding out the creation date for files/folders... darkarcon2015 Linux - Software 1 03-24-2005 06:59 PM
ls -al file creation date blackzone Linux - Newbie 2 08-23-2004 02:31 AM
php read file creation, modified date problem antony_csf Programming 3 08-18-2004 07:46 AM
'ls' command... sramelyk Slackware 7 10-01-2003 01:45 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:24 AM.

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