One of my AWS EC2 Instance is occupying over 222 GB. But surprisingly when I check inside the /root folder, I just found one file which is of 5MB in size. I am not sure how to clear the disk space and how to find all those hidden files, which are taking 222 GB of disk space.
when I this command - du -shx /*
: This is the output I got -
0 /bin
88M /boot
0 /dev
31M /etc
86M /home
0 /lib
0 /lib64
0 /local
0 /media
0 /mnt
2.2G /opt
du: cannot access ‘/proc/7699/task/7699/fd/3’: No such file or directory
du: cannot access ‘/proc/7699/task/7699/fdinfo/3’: No such file or directory
du: cannot access ‘/proc/7699/fd/3’: No such file or directory
du: cannot access ‘/proc/7699/fdinfo/3’: No such file or directory
du: cannot access ‘/proc/7828’: No such file or directory
0 /proc
222G /root
1.7M /run
0 /sbin
0 /srv
0 /sys
0 /tmp
3.1G /usr
5.7G /var
How to clear the /root folder? when I run this command : du -shx /root/*
, I just found a 5MB file but it is taking 222 GB of disk space.