LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to use Find Command for Symbolic links (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-use-find-command-for-symbolic-links-310988/)

nofunyet 04-08-2005 03:14 AM

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.

bigrigdriver 04-08-2005 03:29 AM

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.

nofunyet 04-08-2005 03:52 AM

Thanks and a tip of the hat
 
Thanks that really helped. :D


All times are GMT -5. The time now is 12:16 AM.