Thursday, January 9, 2014

How to check disk files issues: inode exceeded

Check inode through:
df -i

To count all the files in a directory and all it's subdirectories:
$ for i in /*; do echo $i; find $i | wc -l; done
Then you can narrow down your search by replacing the /* for any directory that has an unusually large number of files in. For me it was /var
$ for i in /var/*; do echo $i; find $i | wc -l; done
 
 
Delete when rm fails:
 
 find . -mtime +2 -name '*' -delete

No comments:

Post a Comment