Subject: bin/920: ls -l displays incorrect mtime for symbolic links
To: None <gnats-admin@NetBSD.ORG>
From: Jim Wight <J.K.Wight@newcastle.ac.uk>
List: netbsd-bugs
Date: 03/29/1995 01:35:05
>Number:         920
>Category:       bin
>Synopsis:       ls -l displays incorrect mtime for symbolic links
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 29 01:35:02 1995
>Originator:     Jim Wight
>Organization:

>Release:        1.0
>Environment:
	
System: NetBSD treherne 1.0 NetBSD 1.0 (GENERICAHA) #3: Sun Oct 23 20:58:04 PDT 1994 cgd@sun-lamp.cs.berkeley.edu:/usr/src/sys/arch/i386/compile/GENERICAHA i386


>Description:
    In long format ls displays the modification time of the most recently
    modified file for all symbolic links rather than each's individual
    modification time.

>How-To-Repeat:
    $ ln -s /bin/sh sh1
    $ ls -l
    total 0
    lrwxrwxrwt  1 root  wheel  7 Mar 27 22:28 sh1 -> /bin/sh
    $ ln -s /bin/sh sh2
    $ ls -l
    total 0
    lrwxrwxrwt  1 root  wheel  7 Mar 27 22:29 sh1 -> /bin/sh
    lrwxrwxrwt  1 root  wheel  7 Mar 27 22:29 sh2 -> /bin/sh
    $ >junk
    $ ls -l
    total 0
    -rw-r--r--  1 njkw  wheel  0 Mar 27 22:30 junk
    lrwxrwxrwt  1 root  wheel  7 Mar 27 22:30 sh1 -> /bin/sh
    lrwxrwxrwt  1 root  wheel  7 Mar 27 22:30 sh2 -> /bin/sh
    $ ln -s /bin/sh sh3
    $ ls -l
    total 0
    -rw-r--r--  1 njkw  wheel  0 Mar 27 22:30 junk
    lrwxrwxrwt  1 root  wheel  7 Mar 27 22:31 sh1 -> /bin/sh
    lrwxrwxrwt  1 root  wheel  7 Mar 27 22:31 sh2 -> /bin/sh
    lrwxrwxrwt  1 root  wheel  7 Mar 27 22:31 sh3 -> /bin/sh
    $

    Note how the times associated with the symbolic links keep shifting as
    new files are created.

>Fix:
    None.
>Audit-Trail:
>Unformatted: