LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 03-26-2003, 07:57 PM   #1
robt
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.

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

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

Code:
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:
stat
ls

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


Reply


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 06:15 AM
Finding out the creation date for files/folders... darkarcon2015 Linux - Software 1 03-24-2005 05:59 PM
ls -al file creation date blackzone Linux - Newbie 2 08-23-2004 01:31 AM
php read file creation, modified date problem antony_csf Programming 3 08-18-2004 06:46 AM
'ls' command... sramelyk Slackware 7 10-01-2003 12:45 PM


All times are GMT -5. The time now is 04:23 AM.

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