Wednesday, April 18, 2007

Find All Items In a subtree

find directories:
find ./ -type d | wc -l

find files:
find ./ -type f | wc -l

Remove All Empty Directories

prompt:>> perl -MFile::Find -e"finddepth(sub{rmdir},'.')"

Its safe, rmdir won't delete a directory with anything in it