Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can i see Timestamps in Unix files [closed]

Tags:

unix

ubuntu

Files in UNIX filesystems have 3 types of timestamps: Access, Modify, and Change. In order to investigate this, I created a file and I want to look at timestamps . Anybody knows how can i look the different timestamps. Then, which commands timestamps.

like image 806
Elham abbasi Avatar asked Sep 26 '11 03:09

Elham abbasi


2 Answers

Use stat command:

stat filename
like image 99
Prince John Wesley Avatar answered Oct 21 '22 15:10

Prince John Wesley


to change the atime and mtime, use the touch command:

touch --time=atime -t 198805232211.45
touch --time=mtime -t 205012300945.30
like image 40
Dan D. Avatar answered Oct 21 '22 15:10

Dan D.