Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Dec 1994 16:18:52 -0500
From:      Chuck Bacon <crtb@upcoming.dcrt.nih.gov>
To:        freebsd-bugs@freebsd.org, freebsd-questions@freebsd.org
Subject:   Why does ls report wrong creation date on symlinks?
Message-ID:  <199412302118.QAA02761@upcoming.dcrt.nih.gov>

next in thread | raw e-mail | index | archive | help
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@helix.nih.gov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199412302118.QAA02761>