Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Difference between Access Modify & Change ? (file properties)
What is the meaning of these three ?
Please note that Modify & Change are exactly the same.
I just don't get the idea here, what information each of the A, M, C gives me about the file ?
Pretty easy (and available from the ls or stat man pages) -- access is the last time the file was accessed (unless the partition was mounted with the noatime option, in which case it's meaningless), modify is the time the file was last modified, and change time is the last time file status change (i.e. inode number etc.).
Either I got something wrong here or I got something wrong here (will provide examples when I return to the machine).
In the mean time, could you please tell me if a "read" from a file cosidered "access" ?
As well as "modify", is it a "write" to file ?
What about "change", will writing data to file automaticly updates the files change time, or maybe only a change in permissions (i.e. meta data) will cause the files (or to be more correctly - the inodes) change field to be set ?
b.t.w : I looked at the stat man page, haven't found it there, the ls page I didn't checked.
Pretty easy (and available from the ls or stat man pages)
Quote:
b.t.w : I looked at the stat man page, haven't found it there, the ls page I didn't checked.
Had the same confusion my self. I couldn't find any sort of explanation (just said change was for status change, but not what a status change was) in the stat or ls man pages in the user commands section of the manual (mine are from coreutils 5.2.1 and 4 respectively).
However, if you look in the system call manual page for stat you'll find the info you are looking for (look at the descriptions of the st_atime, st_mtime, and st_ctime fields). To do that type
Code:
man -s 2 stat
to specify you want the stat manual from section 2 (System Calls).
If you want to know which sections of the manual a particular command appears in you can type
What is the difference between UNIX Access, Modify, and Change Times?
What is the difference between UNIX Access, Modify, and Change Times?
This is a silly little thing that I consistently forget … or at least forget some of the subtle differences between these three measures.
Here are the definitions of the different UNIX time information on a file with how they are typically referred to in man pages and the option to list the particular time with the ls command.
Access Time | atime | -ul
This is the time that the file was last accessed, read or written to.
Modify Time | mtime | -l
This is the time that the inode information (permissions, name, etc., the metadata, as it were) was last modified.
Change Time | ctime | -cl
This is the last time the actual contents of the file were last modified.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.