Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-08-2005, 03:14 AM   #1
LQ Newbie
Registered: Apr 2005
Location: Portsmouth, Va
Distribution: Trustix 2.2
Posts: 2

Rep: Reputation: 0
how to use Find Command for Symbolic links

Okay I imagine the answer to my question is already here some where. However, my ability to find it has eluded me so far.

I want to find what actual file is symbolically linked to "ifcfg-lo"

I want to see the contents of this file if I can find it.

I have tried to use the -l in the find command but I haven't gotten the desired results.

I know where the symbolic link is.

If someone would be so kind as to show me the exact command I can use to find the actual file this link points to I'd be very grateful.

The reason for this: I have 2 almost identical systems and on one the link is broken and on the other it is fine. If I can find out where the good link points to I should be able to repair the broken link on the failing system.

Thanks in advance for your kindness.
Old 04-08-2005, 03:29 AM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Instead of find, try ls -l. If you know the directory the file is in, then cd to that directory, and just 'ls -l | less' to get the long list of directory contents. Symlinks will show up with --> pointing from the symlinked file to the file it's linked to.
PS: there is also a utility called 'symlinks', which you may or may not have, which will track down and display all symlinks on your system, as well as give you the ability to remove dangling (read orphaned) symlinks and remove them.

Last edited by bigrigdriver; 04-08-2005 at 03:32 AM.
Old 04-08-2005, 03:52 AM   #3
LQ Newbie
Registered: Apr 2005
Location: Portsmouth, Va
Distribution: Trustix 2.2
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks and a tip of the hat

Thanks that really helped.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to find all symbolic links pointing to a particular file? Akhran Linux - Newbie 5 11-19-2005 06:25 AM
cp and symbolic links? sausagejohnson Linux - General 3 07-19-2005 01:25 AM
How can I find symbolic links rickh Debian 2 05-26-2005 09:06 AM
help with symbolic links sopiaz57 Linux - General 2 06-11-2004 06:17 PM
Symbolic Links Greg_courageous Linux - Newbie 1 05-10-2004 07:05 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:52 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration