df -h checks the disk space of a server and finds that the disk is 100% used
The idea is:
1、cd /usr 2. du -sh * to see which directory takes up the most space 3. Repeat the first two steps, delete or remove according to the actual situation 4. For logs, run cat /dev/null > file.log to clear 5. The package can be uninstalled by rpm -e or rm -rf dir
which is:
Specifically: You can clean up by the following methods:
Use the following command to find large files larger than 100M , and find that several log files and temporary files are relatively large. Use rm –rf to delete them.
find / -size +100M -exec ls -lh {} \;
You can also use du -h --max-depth=1 /path to query the folder occupancy to display the sum of the space occupied by the directory
For example: du -h --max-depth=1 /var
When deleting files, be careful not to delete system files anymore :)