Linux disk space viewing and full space handling

question

When deploying the application to the test environment, some file synchronization errors occur, and finally the test server space is full.

solve

See how much disk space is left

df -h

View the space occupied by each directory in the root directory

du --max-depth=1 -h  /

View the size of the space occupied by the current directory

du -sh 

The files in the current directory are sorted by size

du -s ./* | sort -nr | head -10

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325028177&siteId=291194637