Bash inodes

From I Will Fear No Evil
Revision as of 14:59, 25 April 2024 by Chubbard (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Find inodes used

If you run out of inodes, it is a pita to deal with unexpectedly. In general it should not come as a suprise when this happens on servers that have many small files. It does come as a suprise on servers like PiHole and the issue is unexpected.

df -i will show the inode count on the mounted volumes

But to really dig into the file system and see where the hell they all are at is going to take a different command Run this against directories /var and /opt and you should find the source of the trouble soon..

for i in `find . -type d `; do echo `ls -a $i | wc -l` $i; done | sort -n