Go Back   The UNIX and Linux Forums > Operating Systems > Linux > Red Hat
google site



Red Hat Red Hat is the world's leading open source technology solutions provider with offerings including Red Hat Enterprise Linux (RHEL), Fedora, open source applications, security and systems management, virtualization, and Services Oriented Architecture (SOA) solutions.

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-22-2009
Registered User
 

Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Question 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
Sponsored Links
  #2  
Old 12-22-2009
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 6,729
Thanks: 0
Thanked 53 Times in 50 Posts
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.
  #3  
Old 12-22-2009
Registered User
 

Join Date: Dec 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
Closed Thread

Bookmarks

Tags
-l, linux, ls

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Linux script - Crazy results imprimisxo Shell Programming and Scripting 6 07-25-2009 08:26 PM
linux ISQL and MSSQL unload results to file benefactr Shell Programming and Scripting 0 07-20-2009 12:17 PM
Results for Linux Benchmarks cpjain Linux Benchmarks 50 01-02-2007 05:17 PM
How I will check wheather my linux benchmark results are OK chandra s Linux 1 06-21-2006 10:44 PM



All times are GMT -4. The time now is 07:32 AM.