linux inode consume 100 percent solution
What is the inode?
Files stored on the hard disk,HDD minimum storage units called "sectors" (Sector)。Store 512 bytes per sector (equivalent 0.5KB)。
Operating system hard to read when,Not read a sector,Such efficiency is too low,But sequential read more sectors at once,That is a one-time read "block" (block)。This from a plurality of sectors "chunks",It is the smallest unit file access。Size "chunks",The most common is 4KB,That is a block consisting of eight consecutive sector。
Data files are stored in the "block" in the,Then it is clear,We must also find a place to store meta-information file,For example, the creator of the file、File creation date、File size, etc.。This storage area file meta information is called inode,Chinese translation for "inode"。
Each file has a corresponding inode,Which contains some information and documents relating to the。
How to view innode occupancy System
df -ih
How do I find that most catalog file
First cut to the root directory /
cd /
And then do
for i in /*; do echo $i; find $i | wc -l; done
or
for i in `ls -1A | grep -v "\.\./" | grep -v "\./"`; do echo "`find $i | sort -u | wc -l` $i"; done | sort -rn | head -10
This will in turn return/
Most files under directory,Into this directory,And then execute the above command,In this way layers of depth is up to finalize the directory file
How do I delete all the files in that directory
Under normal circumstances,If there should be millions of files in this directory,If you directly rm -rf 目录名
If inefficient,You can use the following method
find 目录 -type f -name '*' -print0 | xargs -0 rm
Time may be relatively long,So you'd better open a screen to handle
You may be experiencing the following circumstances
/var / spool / postfix / maildrop below many files
in order to avoid,You can perform crontab -e
At the beginning of the most added MAILTO='"'
Save,then server crond restart
Restart crond