out of date ls manpage?

From: Trent Petrasek (tpetrasek@interliant.com)
Date: Tue Apr 23 2002 - 17:10:16 EDT


Hello sun managers,

I am currently writing a shell script and in doing so I
needed to capture the referenced file or directory of a
symbolic link. In the `ls` manpage, dated May 1997, I find:

-L If an argument is a symbolic link, lists the file or
       directory the link references rather than
       the link itself.

yet on the system (an Ultra 2, Solaris 8 10/01) I see the
following behavior:

$ touch realfile
$ ln -s realfile linkfile
$ ls -l
total 2
lrwxrwxrwx 1 trent root 8 Apr 23 16:47
linkfile -> realfile
-rw-r--r-- 1 trent root 0 Apr 23 16:47
realfile
$ ls -L linkfile
linkfile
$ ls linkfile
linkfile

Executing `ls -L` does not show me the file that the link
references, it shows me the link. Is the manpage out of
date? Is the command itself broken? I just installed the OS
a few weeks ago, this system is on a corporate network
behind firewalls, and I do not think a fellow employee
would hack my ls command, but you never know. At any rate,
the system does not appear to be compromised.

I was wondering if anyone knew about this or had any other
knowledge of how to obtain the reference of a symlink short
of awking the (possibly relative) pathname out of a ls -l.
I am not having luck in existing documentation and search
engines.

I will summarize.

Cheers,

Trent

--
Trenton Petrasek
Systems Engineer
Interliant, Atlanta, Engineering
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:14 EDT