Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jun 2006 19:46:37 -0500
From:      Dan Nelson <dnelson@allantgroup.com>
To:        Bill Moran <wmoran@collaborativefusion.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: file creation date in freebsd
Message-ID:  <20060618004637.GH74191@dan.emsphone.com>
In-Reply-To: <20060617192003.7897dc71.wmoran@collaborativefusion.com>
References:  <200606172144.k5HLipM6078421@darkstar.thelakecity.com.pk> <20060617192003.7897dc71.wmoran@collaborativefusion.com>

next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jun 17), Bill Moran said:
> Imran Imtiaz <imran@darkstar.thelakecity.com.pk> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060618004637.GH74191>