How full Linux server space is handled

Source: Internet
Author: User
Tags disk usage

    1. Perform df-h to view total disk usage

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/86/60/wKiom1e9S02DElH5AAAzOsjU5ys336.png-wh_500x0-wm_3 -wmp_4-s_3540852100.png "title=" qq picture 20160824152224.png "alt=" Wkiom1e9s02delh5aaazosju5ys336.png-wh_50 "/>

2. Execute du-sh/* View disk footprint for all directories so we can see that the main is/usr and/var these 2 directories occupy a larger space

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M02/86/60/wKioL1e9T9axjUcuAABTxrjlEs0945.png-wh_500x0-wm_3 -wmp_4-s_1411679746.png "title=" qq picture 20160824153714.png "alt=" Wkiol1e9t9axjucuaabtxrjles0945.png-wh_50 "/>

3. Execute du-sh/var/* View the disk footprint of the/var directory sub-directory, so you can see that this subdirectory is/var/bin occupied

A lot of disk space

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/86/61/wKiom1e9UaaA9YXEAAA8S8kk3gs180.png-wh_500x0-wm_3 -wmp_4-s_3164356066.png "title=" qq picture 20160824153855.png "alt=" Wkiom1e9uaaa9yxeaaa8s8kk3gs180.png-wh_50 "/>

4. Executive du-sh/var/lib/* | Sort-r | Head-n 10 View 10 files with a larger footprint in the/var/lib directory and sort in descending order

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/86/60/wKioL1e9VDzTDw1IAAAywgTebP4284.png-wh_500x0-wm_3 -wmp_4-s_3024368163.png "title=" qq picture 20160824160039.png "alt=" Wkiol1e9vdztdw1iaaaywgtebp4284.png-wh_50 "/>

5 found the system disk occupies a file, find a strange directory file, you can search the Web for the file is useful, whether it can be deleted. However, usually non-/boot/bin/etc/lib/lib64 files are non-system files, the deletion of the system should have little impact, but it is important to confirm before deleting .

6. Delete command

RM-RF * * * (RM space-RF space * denotes file name)

This article is from the "11704231" blog, please be sure to keep this source http://11714231.blog.51cto.com/11704231/1842055

How full Linux server space is handled

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.