I use AWS and I got an EC2 instance. When I run the command du -h –max-depth=1 I get: and When I run the command df -h I get: It look I use only 1GB but it show that I am using 7.1GB. So I run the command lsof +L1 to locate some deleted file that process are still using
Tag: linux-disk-free
How can I *only* get the number of bytes available on a disk in bash?
df does a great job for an overview. But what if I want to set a variable in a shell script to the number of bytes available on a disk? Example: But I just want to return 33333333 (bytes available on /), not the whole df output. Answer Portably: The -P option ensures that df will print output in the