Find the directories containing the most files

Tags: , , , ,

I needed to find the directories containing the most files, so I whipped up this bit of voodoo at the command line: find . -type f -print | perl -na -F/ -e ‘while (pop @F && @F) { print join (“/”, @F).”\n”; }’ | sort | uniq -c | sort -n This will count the [...]

Continue reading » 3 Comments