Find symbolic links that don't point anywhere

Fonte: ARDITI - WIKI
Saltar para a navegação Saltar para a pesquisa

Reference: https://unix.stackexchange.com/questions/34248/how-can-i-find-broken-symlinks

If you want to use a "pure find" method, it should rather look like this:

find . -xtype l

(xtype is a test performed on a dereferenced link) This may not be available in all versions of find, though. But there are other options as well;

You can also exec test -e from within the find command:

find . -type l ! -exec test -e {} \; -print