filesystem timestamps and their usage

Giorgos Keramidas keramida at ceid.upatras.gr
Mon Aug 20 02:54:29 PDT 2007


On 2007-08-19 17:37, deeptech71 at gmail.com wrote:
> Let's talk about file system timestamps. What kind of timestamps are
> there currently, and what are they used for? (or what new timestamps
> would be needed/beneficial, or whatever.)
>
> Currently I can think of only two:
> 1. data_time: The last time the file was written to.
> 2. file_time: The last time the file was moved or written to.
>
> [snip discussion about fictitious timestamp values]

It would be more interesting, educating and useful to discuss the
usefulness of the current 'ctime', 'mtime' and 'atime' attributes
implemented by most UNIX file systems (as opposed to, say, a
discussion of the usefulness and merits of a pair of imaginary
timestamp attributes).

Try searching for 'ctime', 'mtime' and 'atime' in the source tree of
FreeBSD.

The most interesting place (but the most 'technical' too) is, naturally,
the implementation of the UFS file system itself:

        /usr/src/sys/ufs/ufs/dinode.h

If you go through this header file, looking for 'time', you will see
many useful bits and pieces of information.

- Giorgos



More information about the freebsd-chat mailing list