LINUX system disk space full clear method

  

Due to the unreasonable design of the original installation system, some partitions are too small, and network communication failures and other reasons caused by the growth of log files, etc. can be expressed as disk space is full, resulting in unreadable Write the disk, the application cannot be executed, etc. Here are a few tricks for you (using the /home space as an example).

1. Regularly scan important file systems and compare them to analyze those files frequently read and write #IS-IR/home>;files.txt #diff filesold.txt files.txt Growth, while also considering compression of infrequently read and write files to reduce the space. 2. View the inodes consumption of the space file system #df-i/home If there are a large number of inpde available, it means that the large file takes up space, otherwise the thief may take up a lot of small files.

3. Find out the directory with a large space. View the space occupied by /home #du-hs/home View the occupied space under /home more than 1000m #du/awk'$1>;2000'

4. Find out the files that take up a lot of space #find/home-size +2000K

5. Find the files that have been recently modified or created. First TOUCH a file of the time you want as follows #TOUCH -t 08190800 test #find/home-newer test-print Delete log #rm-rf/var/log/* 6. Connect to the partition In a partition with space, do not connect to the empty partition #in-s/home /use/home

7. Find out the process that consumes a lot of space. According to different applications, find the corresponding process and analyze the reason.

Copyright © Windows knowledge All Rights Reserved