stat prints file information, including last modified, changed or accessed time.
On Unix systems every file has 4 timestamps:
|ctime||change time – when the file was modified, permissions changed, etc.|
|atime||accessed time – when file was read (counting utilities such as grep)|
|mtime||modified time – when the file content was changed|
|birth||created time – not used because it has no value|
By default ls -l shows only mtime, ls –time= option can display atime or ctime instead, but it’s much convenient to use stat:
For more options run man 1 stat