From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 25 Feb 2013 02:34:15 -0800 From: Anthony Martin To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20130225103415.GA21986@dinah> References: <06B26204-D2D9-4438-8EB3-603B88F8B03C@ar.aichi-u.ac.jp> <6b8af56ccf29a8e293aefcc39c79576f@rei2.9hal> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b8af56ccf29a8e293aefcc39c79576f@rei2.9hal> Subject: Re: [9fans] curious mtime of cwfs Topicbox-Message-UUID: 1ebbe456-ead8-11e9-9d60-3106f5b1d025 cinap_lenrek@gmx.de once said: > i'm not sure. if you touch an existing file, then it makes sense > that the files mtime gets updated, not the whole directory. > > wstat() and write() on a file only update the files mtime, not > the parent directory. > > however creating a new file or deleting a file from a directory > does change the directories mtime. (the dump change makes it > consistent with that). >>From stat(5): For a plain file, mtime is the time of the most recent create, open with truncation, or write; for a directory it is the time of the most recent remove, create, or wstat of a file in the directory. Cheers, Anthony