Date: Fri, 30 Dec 94 15:40:16 MST From: terry@cs.weber.edu (Terry Lambert) To: crtb@upcoming.dcrt.nih.gov (Chuck Bacon) Cc: freebsd-bugs@freebsd.org, freebsd-questions@freebsd.org Subject: Re: Why does ls report wrong creation date on symlinks? Message-ID: <9412302240.AA13065@cs.weber.edu> In-Reply-To: <199412302118.QAA02761@upcoming.dcrt.nih.gov> from "Chuck Bacon" at Dec 30, 94 04:18:52 pm
next in thread | previous in thread | raw e-mail | index | archive | help
> I had previously noted that all directories in a MSDOSFS tree carry > as their creation date, the current moment. Somebody suggested that > this was a capricious choice, in view of the impossibility of > duplicating the creation date which DOS would report. I wonder > if there is a link between these two bugs. UNIX and UNIX like OS's (and POSIX implementing OS's, for that matter) don't keep an absolute file creation time. They keep a change time (file metadata -- "stat information" -- has changed), a modification time (file contents have changed), and an access time (a read operation has occurred on the file). What you are seeing is not a creation date, unless you are directly accessing the file system directory blocks in the DOS FS. Instead, depending on your options to 'ls', you are seeing one of the dates the is reported in a POSIX compliant FS, but which DOS does not maintain (the modification time). The DOS FS doesn't have this information to give back to you, so it makes something up -- the most convenient thing being the current time. It is precisely the fact that a DOS file system can not store all of the date information required by POSIX that makes it impossible to produce a POSIX compliant DOS file system. The DOS FS simply can not comply with the POSIX "shall mark for update" and "shall update" directives. POSIX leaves a loophole, allowing read-only media to ignore the update requirements -- so you can be technically compliant if you mount the disk read-only. Very useful. 8-). Whether the made up information comes from some date that DOS supports or from the current time or from wherever is really at the programmers option, since the thing will never conform to an existing standard for doing such things (there *is* no such standard). You can optionally use '-c' or '-u' as arguments to 'ls' to get at date information DOS does store. Terry Lambert terry@cs.weber.edu --- Any opinions in this posting are my own and not those of my present or previous employers.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9412302240.AA13065>