Oliver Fromme wrote:
[EMAIL PROTECTED] 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?
_______________________________________________
freebsd-chat@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-chat
To unsubscribe, send any mail to "[EMAIL PROTECTED]"