DF command does not update data space occupancy information

Source: Internet
Author: User
Tags apache log file apache log disk usage

Today a friend of the server space is full, check found that the server Apache logs occupy 3.6G of space, the log clean up after found df-h still show/Occupy space for 100%

What is this for? Because some of the programs that are programmed to run Linux do not immediately make room for deletion, and he deletes exactly the Apache log file that is running in

Use the following command to see which files are still occupied by which process

The code is as follows Copy Code

ls-ld/proc/*/fd/* 2>&1 | Fgrep ' (deleted) '


Lsof/

Of course, we can release the space that is occupied by the log by simply restarting Apache in the case above, which is more clear who is occupying it.

About the DF command in Linux

Description: The DF command in Linux shows the use of the I node and disk block by all file systems.

The various options for this command have the following meanings:

-a displays disk usage for all file systems, including 0 block file systems, such as the/proc file system.

-K is displayed in K-byte units.

-I displays the I-node information, not the disk block.

-T displays disk space usage for each file system of the specified type.

-x Lists disk space usage (contrary to the T option) that is not a file system of a specified type.

-T displays the file system type.

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.