Saturday 1 July 2017

df -h shows wrong disk size

Some times df -h shows root partition 100% full but it's not correct when we try du command it will show different for example check the below screen shot. 


We need to find which is lock all the size for that you can use 

du -sch * 

this command will show the correct size of directories.

now we find nothing has fill the size the we need to check the deleted files cause deleted files which were still occupied by the PID we can find that with following command.

lsof +aL1 /filename

if filename doesn't show anything then use the same command to /

lsof +aL1 /



now it will show deleted files. We need to just kill the pid with kill command

kill -9 5996

and now check the size with df command

df -h


That's all

Note if I miss anything please command me to change my mistakes. Thank you.


Permanent hostname setup for RHEL7

Step 1 Set the host name on NMTUI tool like following nmtui set host name   then save and exit Step 2 add the following l...