On Wed, Sep 22, 2004 at 10:47:38AM -0700, Drew Tomlinson wrote:

> OK, I'm trying to understand the difference.  According to the manual 
> -ctime is "change of file status" and -mtime is "last modification 
> time".  I think I understand what modification means (changing the 
> contents of the file) but what is "change of file status"?  In my 
> particular situation, while reviewing my spam folder for possible "ham", 
> my IMAP client may change the message status from unread to read.  How 
> would this affect the actual message file?

The ctime entry (originally 'creation time') used to be intended to
record when the file was created.  Nowadays it records the last time
the inode for the file changed -- that includes such things as changes
to file permissions, ACLs, option flags etc., but not such things as
modifications to the file contents which don't change the file size a
great deal.

This status has nothing to do with what your IMAP client reports as
the file status.  The ctime concept applies to any file on the system,
no matter what it's used for.  IMAP status just records or modifies an
extra header within the message to indicate if it's been read or not.

Thus reading those messages via IMAP might change mtime but not
ctime. However, I'm not certain of that.  You'll have to experiment.
You can print out the ctime and mtime for the files by:

    % stat -f 'ctime=%Sc mtime=%Sm   %N' -t '%c' *

Usually mtime and ctime will be exactly the same.

        Cheers,

        Matthew
        
-- 
Dr Matthew J Seaman MA, D.Phil.                       26 The Paddocks
                                                      Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey         Marlow
Tel: +44 1628 476614                                  Bucks., SL7 1TH UK

Attachment: pgp7LoNKysm6B.pgp
Description: PGP signature

Reply via email to