How to locate and delete files when the Linux disk is full

Source: Internet
Author: User
@1. generally the first DF to look at, and then CD to the full disk, the execution: Du-shx * This can list all the folder size (x parameter will remove the mount directory, such as samba hanging up the disk, which will interfere with the statistics) in if there are subfolders , continue with the implementation of DU-SHX * first-level @2. Special case (the file is deleted, but it is occupied by a process, and is still being written) the performance of this scenario is that you cannot find the file that consumes the disk in the 1 method, and Du- Shx The result of the entire disk and the result of DF is very different, it must have been deleted, but the process is occupied, and still writing. Such a deleted file will still occupy the disk, when written, the space naturally dropped, this situation with the previous method is unable to find the file. Method: Lsof | grep deleted so that you can find the deleted files that are still occupied by the process, the process is listed, the related process is restarted again, the space is released.

How to locate and delete files when the Linux disk is full

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.