I don't know whether there is a script existing. But I should say that the result is incredible. I ran this piece in /usr. No more than 2 minutes, I got:
/usr/bin/addr2line
/usr/bin/ar
/usr/bin/as
/usr/bin/b2m
/usr/bin/c++
/usr/bin/c++-4.1.1
/usr/bin/c++filt
/usr/bin/c89
/usr/bin/c99
/usr/bin/cat
/usr/bin/cc
/usr/bin/chgrp
/usr/bin/chmod
/usr/bin/chown
/usr/bin/cp
/usr/bin/cpp
/usr/bin/cpp-4.1.1
/usr/bin/ctags
/usr/bin/date
/usr/bin/dd
/usr/bin/df
/usr/bin/ebrowse
/usr/bin/echo
/usr/bin/emacs
/usr/bin/emacsclient
/usr/bin/erb
/usr/bin/esd
/usr/bin/etags
/usr/bin/false
/usr/bin/fuser
/usr/bin/g++
/usr/bin/g++-4.1.1
/usr/bin/gcc
/usr/bin/gcc-4.1.1
/usr/bin/gcov
/usr/bin/gfortran
/usr/bin/gfortran-4.1.1
/usr/bin/gprof
/usr/bin/grep-changelog
复制代码
I know some might be created by gcc-config and so on. But another result is:
secludedsage@SecludedSage /bin $ /1.sh
/bin/gzcat
/bin/lsmod.old
/bin/zcmp
/bin/zegrep
/bin/zfgrep
复制代码
I found that these are all dead links. I think maybe there is no need to clean our system so carefully.