From owner-freebsd-chat@FreeBSD.ORG Thu Sep 13 12:36:18 2007 Return-Path: Delivered-To: freebsd-chat@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D76516A41A for ; Thu, 13 Sep 2007 12:36:18 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (lurza.secnetix.de [83.120.8.8]) by mx1.freebsd.org (Postfix) with ESMTP id DBC0913C468 for ; Thu, 13 Sep 2007 12:36:17 +0000 (UTC) (envelope-from olli@lurza.secnetix.de) Received: from lurza.secnetix.de (localhost [127.0.0.1]) by lurza.secnetix.de (8.14.1/8.14.1) with ESMTP id l8DC5MYZ033231; Thu, 13 Sep 2007 14:05:27 +0200 (CEST) (envelope-from oliver.fromme@secnetix.de) Received: (from olli@localhost) by lurza.secnetix.de (8.14.1/8.14.1/Submit) id l8DC5Jwr033230; Thu, 13 Sep 2007 14:05:19 +0200 (CEST) (envelope-from olli) Date: Thu, 13 Sep 2007 14:05:19 +0200 (CEST) Message-Id: <200709131205.l8DC5Jwr033230@lurza.secnetix.de> From: Oliver Fromme To: freebsd-chat@FreeBSD.ORG, deeptech71@gmail.com In-Reply-To: <46C863A6.5010404@gmail.com> X-Newsgroups: list.freebsd-chat User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (FreeBSD/6.2-STABLE-20070808 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (lurza.secnetix.de [127.0.0.1]); Thu, 13 Sep 2007 14:05:27 +0200 (CEST) Cc: Subject: Re: filesystem timestamps and their usage X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-chat@FreeBSD.ORG, deeptech71@gmail.com List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Sep 2007 12:36:18 -0000 deeptech71@gmail.com wrote: > Let's talk about file system timestamps. What kind of timestamps are > there currently, and what are they used for? This is a late reply, but I haven't seen that question of yours answered so far, so I try to give it a shot. First of all, time stamp support depends on two things: the file system and the operating system. In order to be able to use a certain kind of time stamp, both of them have to support it. For example, FAT does not distinguish between mtime and ctime, so FreeBSD treats them the same on FAT file systems. The following assumes you use UFS2, which is FreeBSD's default. It supports four kinds of file time stamps: - mtime (displayed by "ls -l"): This is updated each time the file is written to. - atime ("ls -lu"): Updated each time the file is read. Can be disabled (for performance reasons) by mounting a file system with the "noatime" option. - ctime ("ls -lc"): Updated each time the file status changes. In other words, when the meta data contained in the inode changes, or when a directory entry associated with the inode changes. For example, renaming or moving a file will update the ctime, also changing ownerships, permissions etc. - birthtime ("ls -lU"): The time when the inode was created. It never changes. You can read the details in the stat(2) manual page, including an exact enumeration of syscalls which affect the various time stamps. The first three of the time stamps (mtime, atime and ctime) are specified by standards (POSIX, SUS), so there's not much room for discussion, I think. Also keep in mind that FreeBSD needs to be interoperable with other systems, so adhering to the standards is a must. The birthtime is an extension, but I think it is a natural and useful one (FAT supports it, too, by the way). Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "Clear perl code is better than unclear awk code; but NOTHING comes close to unclear perl code" (taken from comp.lang.awk FAQ)