Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ctime is the inode change time. If reading a file, its atime will be updated, which should cause inode member i_atime changed, which is an inode change. So ctime should also be updated. But if I try to ls a directory on redhat, only the directory atime gets updated, not ctime. Why?
If reading a file, its atime will be updated, which should cause inode member i_atime changed, which is an inode change. So ctime should also be updated. But if I try to ls a directory on redhat, only the directory atime gets updated, not ctime. Why?
Because otherwise ctime would be just a copy of atime in practice.
Only changes made to inodes by userspace processes are reflected in ctime.
Because otherwise ctime would be just a copy of atime in practice.
Only changes made to inodes by userspace processes are reflected in ctime.
ctime changes in much more situations than atime. Any member change of inode would cause ctime change, such as i_mode (by chmod), i_uid, i_gid(by chown), etc.. But for atime, only file content access. So how can say "otherwise ctime would be just a copy of atime in practice"?
ctime changes in much more situations than atime. Any member change of inode would cause ctime change, such as i_mode (by chmod), i_uid, i_gid(by chown), etc.. But for atime, only file content access. So how can say "otherwise ctime would be just a copy of atime in practice"?
Because in practice, files are read often, while ownership and mode changes extremely rarely (less than once per file lifetime on average).
Basically, mtime tells the last time the file contents have changed; atime tells the last time the content has been accessed (except for indexers and other applications that use the O_NOATIME open(2) flag); and ctime tells the last time the file ownership or access mode has been changed. This means that in practice, ctime is almost always older than atime.
If atime change also triggered an ctime change, then all typical files would have ctime == atime.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.