Quantcast
Viewing all articles
Browse latest Browse all 14

Answer by conradkdotcom for How can I find broken symlinks

This will print out the names of broken symlinks in the current directory.

for l in $(find . -type l); do cd $(dirname $l); if [ ! -e "$(readlink $(basename $l))" ]; then echo $l; fi; cd - > /dev/null; done

Works in Bash. Don't know about other shells.


Viewing all articles
Browse latest Browse all 14

Trending Articles



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