Quantcast
Channel: How can I find broken symlinks - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 16

How can I find broken symlinks

$
0
0

Is there a way to find all symbolic links that don't point anywere?

find ./ -type l

will give me all symbolic links, but makes no distinction between links that go somewhere and links that don't.

I'm currently doing:

find ./ -type l -exec file {} \; | grep broken

But I'm wondering what alternate solutions exist.


Viewing all articles
Browse latest Browse all 16

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>