Listing the creation date/time of a file in unix

Hi,
I need the unix command which returns only the file name and its creation date/time in unix.

I tried ls -l <filename>. But that is giving other details also which I do not want.
Could anyone help me out?

Thanks.

This might serve your purpose.

ls -lrt | tr -s " " | cut -d" " -f6-9

Rahul.

the time that is displayed is the modification time of the file

and i believe no where in the i-node file creation date/time would be stored

Agree with you.

But creation time should be stored somewhere i beleive as the find command can get the files created on/before/after a particular date. Curious to know where this info might be available.

Rahul.

could you please let me know what is the option available in find to retrieve a file created before n days?

from the man pages of find with respect to time modification

-atime n
         True if the file was accessed n days ago.
-ctime n
        True if the file's status was changed n days ago.    
 -mtime n
        True if the file's data was modified n days ago.

no where file creation date/time would be stored

This has helped. Thank you all for your support. Actually I wanted to access the modified date and time only.

I would anyhow find out whether it is possible to know the creation date and time of a file in unix and let you all know.

Thanks again. :slight_smile: :slight_smile: :slight_smile: :slight_smile:

Code:
-ctime n
True if the file's status was changed n days ago.

Sorry,

I thought ctime was creation date. Just went by the name.