Linux ls -L Results


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat Linux ls -L Results
# 1  
Old 12-22-2009
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
# 2  
Old 12-22-2009
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
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
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Assign SQL Query Results to Variables in Linux?

Hi, I am new to linux... How to Assign SQL Query Results to Variables in Linux,i want ti generate it in param files, Can anyone please explain me. Ex: SQL> Select * from EMP; O/P: Emp_No Emp_Name 1 AAA 2 BBB 3 CCC and I want expected... (5 Replies)
Discussion started by: Sravana Kumar
5 Replies

2. UNIX for Dummies Questions & Answers

LINUX SORT command chops results

I am trying to sort a file . The file looks like this: DDFF 2 /ztpfrepos/pgr/load DDFQ 2 /ztpfrepos/pgr/load DDFX 2 /ztpfrepos/pgr/load DDUA 2 /ztpfrepos/pgr/load My command: sort -k1 /home/c153507/Bin/OPL1.txt -o /home/c153507/Bin/OPL1.txt The results are OK except for one line where... (4 Replies)
Discussion started by: Yahalom
4 Replies

3. Shell Programming and Scripting

Can ctag and cscope support recording search results and displaying the history results ?

Hello , When using vim, can ctag and cscope support recording search results and displaying the history results ? Once I jump to one tag, I can use :tnext to jump to next tag, but how can I display the preview search result? (0 Replies)
Discussion started by: 915086731
0 Replies

4. UNIX and Linux Applications

linux sqlplus select results writes into file twice

Hello, This is my first post and its because I could not find solution for myself I decided to ask help here. What I want to do; I want to get some data from a table 1 on server 1 and insert those datas into a table 2 on server 2. ( lets say schema names are server1 and server 2 also ).... (10 Replies)
Discussion started by: azuahaha
10 Replies

5. Shell Programming and Scripting

Print some results in a text file using script in linux

hello everyone, i really need your help to write a script which would just print following kind of result into a text file (result.txt) XYZ test Results ID: <unique-id> Date: <date> ------------------------------------------------- | Task | Result | Time |... (3 Replies)
Discussion started by: viriimind
3 Replies

6. Shell Programming and Scripting

Linux script - Crazy results

Here is my script: # # Capture the current directory. export -p CurrentDir="`pwd`" echo $CurrentDir # # Capture the new directory name in the form YYYYMMDD. export -p DateDir="`date +"%Y%m%d"`" echo $DateDir # # Store the desired target directory. export -p... (6 Replies)
Discussion started by: imprimisxo
6 Replies

7. Shell Programming and Scripting

linux ISQL and MSSQL unload results to file

Hello, I am using suse 10.1 and isql from unixodbc to connect to a MS SQL server. I got everything to work fine. What do I need to unload the results from the sql to a file? I attempted to put unload to in my sql statement but got a error. I don't see in the isql help where it has a option to... (0 Replies)
Discussion started by: benefactr
0 Replies

8. Linux Benchmarks

Results for Linux Benchmarks

Hi, I was trying to build Linux Benchmarks with latest Intel C++ Compiler. When I used -ipo (inter-procedural optimization) option, arithmetic test (arith.c) failed on execution. The problem is Intel compiler's advanced optimization option (-ipo) optimizes much more than expected and this... (50 Replies)
Discussion started by: cpjain
50 Replies

9. Linux

How I will check wheather my linux benchmark results are OK

My system bench mark results INDEX VALUES TEST BASELINE RESULT INDEX Arithmetic Test (type = double) 2541.7 876123.7 344.7 Dhrystone 2 without register variables 22366.3 5411602.3 ... (1 Reply)
Discussion started by: chandra s
1 Replies
Login or Register to Ask a Question