Friday, February 10, 2012

Linux file creation and modification date

touch myfile.txt

ls -ltr

-rw-rw-r-- 1 soa soa 0 Feb 10 11:24 myfile.txt

this is the MODIFICATION DATE (which at the beginning is same as creation date)

if you later modify the file, there is no way (in Linux) to retrieve the creation date. You will always get the modification time.

"ls -lact --full-time" will not help

stat myfile.txt will not help

http://bloggerdigest.blogspot.com/2006/10/using-ls-command-by-examples.html gives a good list of ls options

No comments: