[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Why does ls report wrong creation date on symlinks?
- To: freebsd-bugs@xxxxxxxxxxx, freebsd-questions@xxxxxxxxxxx
- Subject: Why does ls report wrong creation date on symlinks?
- From: Chuck Bacon <crtb@xxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 30 Dec 1994 16:18:52 -0500
- Sender: questions-owner@xxxxxxxxxxx
I just discovered that "ls -l" reports the creation date incorrectly
on symlinks. It reports as the creation date of each symlink, the
modification time of its directory. Thus, if I "touch foo" in some
directory, a subsequent "ls -l" will report the identical creation
time for both foo and all the symlinks in the directory. Therefore,
"ls -lt" will position all the symlinks at the top.
I created a perl script, using the "stat" function to report all 3
dates, atime, mtime and ctime; it correctly reports those times, in
contradiction to the mtime reported by "ls -l".
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.
Chuck Bacon -- crtb@xxxxxxxxxxxxx