Reference: https://www.cnblogs.com/healthinfo/p/12402139.html
My disk is full, but du -sh * cannot find large files in each file directory
## 查询一级目录所有文件
du -h --max-depth=1
## 查询二级目录所有文件 并排序
du -h --max-depth=2 |sort -n
- 1
- 2
- 3
- 4
- 5
Found a solution by searching
lsof -n | grep deleted 查看到占用的进程
- 1
kill -9 进程号
- 1
Then check df -h to find that the space is reclaimed
Original explanation
When we use rm to delete a large file on Linux, but if a process opens this large file but does not close the handle of this file, then the Linux kernel will not release the disk space of this file
The knowledge points of the article are matched with the official knowledge files, and relevant knowledge can be further learned
Python entry skill treeadvanced grammarFile
77530 people are studying systematically
Reference: https://www.cnblogs.com/healthinfo/p/12402139.html
My disk is full, but du -sh * cannot find large files in each file directory
## 查询一级目录所有文件
du -h --max-depth=1
## 查询二级目录所有文件 并排序
du -h --max-depth=2 |sort -n