background
When I connect to MySQL remotely, an error message shows that the tmp space is gone. I enter Linux to check
View space usage
df -h
Uh, I’m so tired, I only have 40G of space in total, and the usage has reached 100%, so I have to clean it up quickly
View files larger than 100 megabytes
find / -size +100M |xargs ls -lh
Suddenly remembered, I used to use the server as a transfer station, uploaded a video of about 15G, and then deleted it
rm -rf /root/learn/python/*
Note: du -h --max-depth=1
You can view the current folder size
clear log
You can see that the log of a project has reached more than 400 MB, let’s also clean it up
cat /dev/null > /root/java/blog/nohup.out
View the effect
Now 22G is available again, be happy