From owner-freebsd-chat@FreeBSD.ORG Thu Sep 13 13:50:46 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 3CD0D16A418 for ; Thu, 13 Sep 2007 13:50:46 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.187]) by mx1.freebsd.org (Postfix) with ESMTP id 9198413C458 for ; Thu, 13 Sep 2007 13:50:45 +0000 (UTC) (envelope-from deeptech71@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so490691nfb for ; Thu, 13 Sep 2007 06:50:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; bh=l1F/QF5H2CvsDioe4i/xMAJCYD8bDf154zZ24xclIfs=; b=msZKwBBbJ/adhQNb3DcmZrijQrv9gXGRuBgDuOLWWz0MuBUBB6nnt9yzxuVl+C2xaM6eA5UC3V68jpD8jH1zpMvmd7z43AhBWcnoc27qMEcDhHEGyV8+aKrgVJPeIMslZ0KBpX3IKB2n0z3ie2+YMW40hZ+5/eO8HvUweZbaL5U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=JOXkSYQVPr9jNizMphUq8GvNFYA7lKJ7SgoO/5Tpnt+cYPEipkuL8IP+zd3JPA7ohxLVmgihfnZvjfFnthn0/JORiPKcTIUJhEdcgrSABmM2mgbATknIj1nyBwvGY1o2JKiwea/o/7Y9s5Uams8Dc2i2bQJpV6iG5IzwKc+KzW0= Received: by 10.86.51.2 with SMTP id y2mr556030fgy.1189691442569; Thu, 13 Sep 2007 06:50:42 -0700 (PDT) Received: from ?192.168.123.111? ( [84.0.103.140]) by mx.google.com with ESMTPS id f31sm15641395fkf.2007.09.13.06.50.40 (version=SSLv3 cipher=RC4-MD5); Thu, 13 Sep 2007 06:50:40 -0700 (PDT) Message-ID: <46E94037.9070807@gmail.com> Date: Thu, 13 Sep 2007 15:50:47 +0200 From: deeptech71@gmail.com User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: freebsd-chat@freebsd.org References: <200709131205.l8DC5Jwr033230@lurza.secnetix.de> In-Reply-To: <200709131205.l8DC5Jwr033230@lurza.secnetix.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: filesystem timestamps and their usage X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list 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 13:50:46 -0000 Oliver Fromme wrote: > 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 > I know that every stuff like this is different here and there, and actually the topic should have been named something like "let's make a filesystem, what timestamps would you recommend?". I've already looked up information about the UFS times (didn't know what birthtime is though). But thanks anyway. What surprized me is that these are standardized. How do you detect UFS hard links from a program? Do these "virtual files" have the same birth time?