Find broken symlinks - easy way

Submitted by Janak on Wed, 06/10/2009 - 12:08

Need to find any broken Symlinks on your server? Here is a handy command:

for i in `find /var/www/html -type l`; do [ -e $i ] || echo $i is broken; done