Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know that ls -l will give you the "number of links" but I'm looking for a command or combination of commands that will give me a list of all the symbolic links that point to a particular file.

share|improve this question
The links you see with ls -l are hard links. Symbolic links are something else entirely. Just out of curiosity, why do you care about symbolic links? – chris Nov 24 '09 at 5:05

Something like this might work:

find -L / -samefile /path/to/your/file

Obviously you'll need to replace /path/to/your/file with the file in question.

A brief explanation:

  • -L = treat symbolic links as if they were the file to which they refer
  • / = search from the root of the file system
  • -samefile = find the files that are the same as this one
share|improve this answer
Huh. I consider myself fairly conversant with find but I swear I learn about an option I'd never heard of before every couple weeks... – Insyte Nov 24 '09 at 9:10
I didn't know about it myself until I read through the man page in order to answer this question ;) – molecularbear Nov 24 '09 at 13:05

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.