Thursday, 1 May 2008

Find and delete broken symlinks

The Gentoo guide to switch from tetex to texlive contains a little command line gem. It allows you to look for broken/dangling symbolic links and delete them interactively:

find /usr/bin -type l ! -xtype f ! -xtype d -ok rm -f {} \;

1 comment:

rc3 said...

find /usr/bin -type l ! -xtype f ! -xtype d -delete