Finding dangling symbolic links


The following command finds only broken symbolic links:

$ find -L -type l

This works because « -L » causes find to dereference symbolic links, in which case only broken links will have type « l ». This is probably unique to gnu find (from findutils).

Based on comment in linuxforums.org.

Share

Les commentaires sont fermés.