File Times (mtime, ctime, atime)
Unlike Windiws, you can not determine when a file was created. Instead, you can only determine three things:
- atime – the time in which a file was accessed. This includes viewing the contents of the file or executinng a shell script.
cat example\_file
- ctime – the time in which a file’s inode (owner, group, and permissions) and when the file’s contents were last changed. To view the files ctime with the ls command use the -lc flags.
chown root:root example\_file
- mtime – is the time in which a files conntents have been modified. This differs from the ctime as it will not reflect when the permissions were modified.
echo "Hello!" >> example\_file