- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- "ls -L" command
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 09:20 AM
04-21-2004 09:20 AM
Do I understand this wrong ( from "man ls") ?
-L If the argument is a symbolic link, list the file or directory to which the link refers rather than the link itself."
# ll
total 2
-rw-rw-r-- 1 root sys 16 Apr 21 23:05 AAA
lrwxrwxr-x 1 root sys 3 Apr 21 23:05 BBB -> AAA
#
#
# ls BBB
BBB
#
# ls -L BBB
BBB
As I understand the ls -L BBB should return AAA (as BBB is a link and refers to AAA).
Or, am I wrong ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 09:25 AM
04-21-2004 09:25 AM
Re: "ls -L" command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 09:38 AM
04-21-2004 09:38 AM
Re: "ls -L" command
# ll
total 0
-rw-rw-r-- 1 root sys 0 Apr 21 16:29 hazem1
-rw-rw-r-- 1 root sys 0 Apr 21 16:29 hazem2
lrwxrwxr-x 1 root sys 6 Apr 21 16:30 hazem3 -> hazem1
# chmod 600 hazem1
# ll -L hazem1
-rw------- 1 root sys 0 Apr 21 16:29 hazem1
# ll -L hazem3
-rw------- 1 root sys 0 Apr 21 16:29 hazem3
# ll hazem3
lrwxrwxr-x 1 root sys 6 Apr 21 16:30 hazem3 -> hazem1
-Hazem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 09:50 AM
04-21-2004 09:50 AM
Re: "ls -L" command
Yes, I notice the difference (but I am not sure I find it very logic).
I searched for a (direct) method to get the file or directory a link refers to (AAA in my example).
Of course there is simple workarounds, For example:
ll BBB | awk '{ print $NF }'
And, there is a readlink() system call.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 09:56 AM
04-21-2004 09:56 AM
Solution- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 09:59 AM
04-21-2004 09:59 AM
Re: "ls -L" command
e.g.
[morpheus|jdonovan]
$ ll /bin
lr-xr-xr-t 1 root sys 8 Feb 22 2003 /bin -> /usr/bin
[morpheus|jdonovan]
$ ll -L /bin
total 74512
dr-xr-xr-x 3 bin bin 8192 Mar 22 13:08 X11
-r-xr-xr-x 1 bin bin 73728 Nov 14 2000 acl_edit
-r-xr-xr-x 1 bin bin 212992 Nov 14 2000 adb
.
.
.