3 # Copyright © 2000, 2003 by The XFree86 Project, Inc
5 # Remove dangling symlinks and empty directories from a shadow link tree
6 # (created with lndir).
8 # Author: David Dawes <dawes@xfree86.org>
11 find . -type l -print |
14 while [ X"$i" != X ]; do
15 if [ ! -f "$i" ]; then
16 echo $i is a dangling symlink, removing
23 echo Removing empty directories ...
24 #find . -type d -depth -print | xargs rmdir > /dev/null 2>&1
25 find . -depth -type d -empty -print -exec rmdir {} \;