Find directories with the most files
which directory uses the most inodes | count files per directory linux | find folder with millions of files | where are all the small files | du | inodes | cleanupdu --inodes -x -d 1 /var/www/vhosts 2>/dev/null | sort -rn | head -20Counts the inodes (files, directories, links) in each direct subdirectory and sorts them in descending order. When df -i is at its limit, this lets you drill down level by level to the directory with huge numbers of small files. Common culprits are cache folders of WordPress plugins and session directories.
Note: On very large trees this takes a while, since every entry is visited individually.
Also searched as
- which directory uses the most inodes
- count files per directory linux
- find folder with millions of files
- where are all the small files