From owner-freebsd-questions@FreeBSD.ORG Sun Jun 18 00:46:39 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A54A16A47A for ; Sun, 18 Jun 2006 00:46:39 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.FreeBSD.org (Postfix) with ESMTP id 270E643D45 for ; Sun, 18 Jun 2006 00:46:39 +0000 (GMT) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.13.1/8.13.4) id k5I0kbbK005102; Sat, 17 Jun 2006 19:46:37 -0500 (CDT) (envelope-from dan) Date: Sat, 17 Jun 2006 19:46:37 -0500 From: Dan Nelson To: Bill Moran Message-ID: <20060618004637.GH74191@dan.emsphone.com> References: <200606172144.k5HLipM6078421@darkstar.thelakecity.com.pk> <20060617192003.7897dc71.wmoran@collaborativefusion.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060617192003.7897dc71.wmoran@collaborativefusion.com> X-OS: FreeBSD 5.5-PRERELEASE X-message-flag: Outlook Error User-Agent: Mutt/1.5.11 Cc: freebsd-questions@freebsd.org Subject: Re: file creation date in freebsd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jun 2006 00:46:39 -0000 In the last episode (Jun 17), Bill Moran said: > Imran Imtiaz wrote: > > However we can find the modification date of a file but is it > > possible that we can also get creation date of the file? > > There is nothing in the filesystem that stores this info. > > However, the ctime is often used for this purpose. The ctime stores > the last time the file metadata was changed (such as permissions and > ownership). Since it's uncommon for people to change the file > metadata, the ctime can be a good indicator of when the file was > created, but it's no guarantee. Actually, there is if you are using UFS2. The stat field is called the st_birthtime, although the code to print it via ls (with -U) was just committed recently and isn't available in 6.1. -- Dan Nelson dnelson@allantgroup.com