Tote Symlinks finden

Mit folgendem Befehl kann man tote Symlinks (Softlinks) finden:

find /path/ -type l -print0 | xargs -r0 file | grep „broken symbolic“ | sed -e ’s/^\|: *broken symbolic.*$//g‘ | xargs ls -l –color

Alternativ geht’s auch so:

find . -type l -exec [ ! -a \{\} ] \; -print| xargs ls -l –color

Veröffentlicht am
Kategorisiert in Linux