file creation date in freebsd
Dan Nelson
dnelson at allantgroup.com
Sun Jun 18 00:46:39 UTC 2006
In the last episode (Jun 17), Bill Moran said:
> Imran Imtiaz <imran at 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 at allantgroup.com
More information about the freebsd-questions
mailing list