This question already has an answer here:
How can I find all of the symbolic links in a directory, that point to the same target?
For example, here is a list files in a directory:
a.txt b.txt a -> target1 c -> target1 m -> target2 n -> target3 c.txt z -> target1
I want to get a list of what linked to
target1. So the expected output will be:
a c z