LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   creation date of file using the 'ls' command (https://www.linuxquestions.org/questions/linux-newbie-8/creation-date-of-file-using-the-ls-command-51921/)

robt 03-26-2003 07:57 PM

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

moses 03-27-2003 12:34 AM

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


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