LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 06-04-2005, 09:01 AM   #1
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Rep: Reputation: 15
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 ?

Code:
stat access_log
  File: `access_log'
  Size: 1176201         Blocks: 2306       IO Block: 131072 regular file
Device: 303h/771d       Inode: 868798      Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Access: 2005-05-13 21:50:51.000000000 +0300
Modify: 2005-06-04 16:29:55.000000000 +0300
Change: 2005-06-04 16:29:55.000000000 +0300
Thank you.

Last edited by hq4ever; 06-04-2005 at 09:13 AM.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 06-04-2005, 12:11 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.).
 
Old 06-04-2005, 08:29 PM   #3
hq4ever
Member
 
Registered: May 2004
Location: Israel
Distribution: Debian
Posts: 98

Original Poster
Rep: Reputation: 15
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.



Thank you,
Maxim.
 
Old 07-10-2005, 08:16 PM   #4
EnoksrD
LQ Newbie
 
Registered: Jul 2005
Distribution: Debian, Ubuntu
Posts: 1

Rep: Reputation: 3
Quote:
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

Code:
whatis <command>
e.g.

Code:
whatis ls
to see that there is no ls system call.

Hope that helps.
 
3 members found this post helpful.
Old 08-26-2008, 10:47 AM   #5
7655cjc
LQ Newbie
 
Registered: May 2007
Posts: 1

Rep: Reputation: 1
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.
 
1 members found this post helpful.
Old 01-17-2010, 02:42 AM   #6
mohammednv
LQ Newbie
 
Registered: Mar 2007
Posts: 22

Rep: Reputation: 20
You got it wrong 7655cjc.

You interchanged mtime and ctime :-)
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between access point and wireless router? Vincent_Vega Linux - Wireless Networking 14 04-26-2010 08:34 AM
how do i modify my smb.conf to allow anyone access ... Lleb_KCir Linux - Software 4 11-27-2004 04:55 PM
Do I modify 3 files to change hostname? imsam Linux - Newbie 1 10-29-2004 10:29 PM
I want change mail header info, which config file i should modify? exper Linux - Software 2 12-05-2003 06:46 AM
modify file access & modify timestamps i2itstud Linux - General 1 05-20-2003 03:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration