Three times tracked for each file in Unix are these:
* access time - atime
* change time – ctime
* modify time – mtime
atime – File Access Time
Access time shows the last time the data from a file was accessed – read by one of the Unix processes directly or through commands and scripts.
Example: cat, grep, sort, vim, file_get_contents..
ctime – File Change Time
ctime also changes when you change file's ownership or access permissions. It will also naturally highlight the last time file had its contents updated.
Example:
chmod +x huypv.dat
echo 123 >> huypv.dat
echo 123 > huypv.dat
vim (write data)
mtime – File Modify Time
Last modification time shows time of the last change to file's contents. It does not change with owner or permission changes, and is therefore used for tracking the actual changes to data of the file itself.
Example:
echo 123 >> huypv.dat
echo 123 > huypv.dat
vim (write data)
Title:
mtime vs atime vs ctime
Description:
Three times tracked for each file in Unix are these: * access time - atime * change time – ctime * modify time – mtime atime – File Acc...
...
Rating:
4