Linux ls -L Results

I seem to be somewhat baffled by the results of the -L option of the ls command on our new Linux system.

I have a symbolic link defined like the following:
ptmawpmfld.sqr as /u21/xxxx/m/moranp1/yyyy/fixpaths/tests20091218/awpmfld.sqr

When I issue the command ls -l ptmawpmfld.sqr, I see the usual symbolic link result.

When I issue the command ls -lL ptmawpmfld.sqr in our new Linux system, I see info for ptmawpmfld, rather than for awpmfld.sqr as I would expect from the info in the man pages for ls. (When I execute the same command on our old Tru64 system, I do get the info for awpmfld.sqr.)

Can someone explain what I am missing in my reading of the man page entry for the -L (or --dereference) option of the ls command?

Thanks, in advance.

Pat

ls -L executes the readlink system call. Meaning it translates the link "name" to the real name of the file.

You may have noticed that a link file is only a few bytes. It is literally just text that references another file.

Thanks for your reply, Jim.

I do notice that the file size is different. But the actual name of the file is awpmfld.sqr while the name of the link is ptmawpmfld.sqr. The Tru64 version of the ls -L does indeed list this actual file name (awpmfld.sqr) while the Linux version lists the link name (ptmawpmfld.sqr) not the actual file name (awpmfld.sqr).

Any idea why the difference? I understand the man pages entry to make me expect, as you said, the actual file name. Any idea what's happening here?

Pat