![]() ![]() You can also not change ctime in the past by normal means. You can change ctime alone by modifying file permissions using chmod or chgrp commands but you cannot modify mtime without modifying ctime. ![]() If you modify the file, the data blocks change, and thus ctime is changed. It represents the last time the data blocks or metadata of a file was changed. It’s because while mtime is under the control of user, ctime is controlled by the system. ![]() Remember, ctime is always changed with mtime. Size: 10 Blocks: 8 IO Block: 4096 regular fileĭid you notice something weird? You modified the file and expected the mtime to be changed, but it also changed the ctime. This will prevent the change in access time. I’ll use the cat command to add new text to this file. If I use the less command to view the file, it will change only the access time because the content and metadata of the file remain the same. All three timestamps are the same here because I just created this empty file with the touch command. You can see all three timestamps (access, modify and change) time in the above output. The output will be like this: stat abhi.txt You just need to provide the filename with it. You can use the stat command to see all the timestamps of a file. The metadata includes file permissions, ownership, name, and location of the file. This timestamp tells you when was the last time the property and metadata of the file were changed. ctimeĬtime stands for status change time. Modifying means the contents of a file were changed by editing the file. This timestamp tells you when was the last time the file was modified. By access, it means if you used cat, vim, less, or some other tool to read or display the content of the file. This timestamp tells you when was the last time the file was accessed. What are Linux timestamps?Īny file in Linux has these three timestamps typically:Ītime stands for access time. In Linux, every file has some timestamps that provide some crucial analytics about when the file or its attributes were modified or changed. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |