# Example from LXF276: find -L / -xdev -type l -exec ls -l {} + find -L / -xdev -type l -exec rm {} + # -L follow valid symlinks, act on targets # -xdev do not descend into other filesystems # which excludes /dev, /proc etc # -type l picks up broken symlinks # -exec ls -l list broken symlink # -exec rm remove broken symlink