Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!ima!mirror!xanth!john From: john@xanth.UUCP Newsgroups: comp.unix.questions Subject: Re: file times Message-ID: <861@xanth.UUCP> Date: Mon, 20-Apr-87 21:41:03 EST Article-I.D.: xanth.861 Posted: Mon Apr 20 21:41:03 1987 Date-Received: Wed, 22-Apr-87 01:12:57 EST References: <12854@watnot.UUCP> <6362@mimsy.UUCP> <12905@watmath.UUCP> Distribution: na Organization: Old Dominion University, Norfolk Va. Lines: 20 In article <12905@watmath.UUCP>, djfiander@watmath.UUCP writes: > In that case, what is the difference between ctime and mtime? According to > mtime is last modification time and ctime is last inode change > time. When would one change, and not the other? The mtime changes whenever the contents of the file change; on a creat() call or equivalent, or on a write() call. The ctime changes whenever the inode information changes: chown, chmod, link, unlink, etc. (This means that mv'ing the file changes the ctime, at least twice....) Of course writing to the file will change the ctime too (although I'm not sure if writing to the file without changing the size does - anyone not too lazy to try it or look in a kernel). The only exception I know of is that updating the access time doesn't change the ctime (!). -- John Owens Old Dominion University - Norfolk, Virginia, USA john@ODU.EDU old arpa: john%odu.edu@RELAY.CS.NET +1 804 440 4529 old uucp: {seismo,harvard,sun,hoptoad}!xanth!john