[Switch] Linux tutorial: df command does not update data space occupation information solution

Today, a friend's server space is full. After inspection, it is found that the server apache log occupies 3.6G of space. After cleaning the log, it is found that df -h still displays / occupies 100% of the space.

click to see the work

 

Why is this? Because some linux files controlled by the running program will not make space immediately after deletion, and he deletes just the log file of the running apache

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

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

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326990462&siteId=291194637