In Ubuntu 18.04 as root user executing "df -h" and getting:
Filesystem Size Used Avail Use% Mounted on
...
/dev/vda1 40G 36G 2,4G 94% /
...
, that is 36 Gb is used.
Next, doing "cd /" + "du -sm *| sort -nr" and getting:
22892 home
3329 var
1735 lib
1004 usr
243 boot
176 backup
21 run
15 tmp
9 bin
8 etc
6 sbin
1 srv
1 root
1 opt
1 mnt
1 media
1 lost+found
1 lib64
0 vmlinuz.old
...
That is used: 22892+3329+1735+1004+243+176+21+15+9+8+6+1+1+1+1+1+1+1=29445 Mb
So where did 36-29 = 7 Gb go?
I am puzzled by the question due to every day several tens of megabytes disappear somewhere. How I can find the folder with those disappeared 7 Gb?
Info from https://askubuntu.com/questions/280342/why-do-df-and-du-commands-show-different-disk-usage solves my problem. Command:
lsof | grep '(deleted)'
shows me those processes which hold unlinked but held open files. After killing them all unlinked files was released and free up disk space. Thanks, @Mime.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.