How do I get a list of symbolic links, excluding broken links?

Viewed 8480

I have been able to find a command to get a list of the broken links only, but not the "working" symbolic links

find -H mydir -type l

How can I do the opposite?

If I have these files in mydir:

foo
bar
bob
carol

If they are all symbolic links, but bob points to a file that doesn't exist, I want to see

foo
bar
carol
3 Answers
Related