Linux system disk space Full cleanup method

Source: Internet
Author: User

Because the original installation system design is unreasonable, some zoning is too small, as well as network communication failures and other causes of log file speed growth and other reasons can be displayed as disk space full, resulting in the inability to read and write the disk, the application can not execute. Here are a few tips for you (take/home space full as an example).

1. Regular scanning of important file systems, and comparison, analysis of those documents often read and write

#IS-ir/home>;files.txt

#diff Filesold.txt Files.txt

By analyzing the growth of the predicted space, you can also consider compressing the infrequently read and write files to reduce space usage.

2. View the inodes consumption of the space file system

#df-i/home

If there are a large number of inpde available, indicating that large files occupy space, no thief may be a large number of small files occupy space.

3. Find a large footprint directory

View space occupied by/home

#du-hs/home

View footprint over 1000m under/home

#du/awk ' $1>;2000 '

4. Find a document that occupies a larger space

#find/home-size +2000k

5. Find the most recently modified or created file

First touch a file with the time you want as follows

#TOUCH-T 08190800 Test

#find/home-newer Test-print

Delete Log

#rm-rf/var/log/*

6. Make connections to partitions

In a space partition, make a connection to an empty partition

#in-s/home/use/home

7. Find a process that consumes a lot of space

According to the different application, find the corresponding process, analyze the reason.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.