Can someone please tell me if there is a way to know,at a glance whether the output of a df -k is kilobytes, megabytes or gigabytes?????????? (I am always having to do the math). Thanks
df -k is always in 1024 blocks: that is KB -- always. plain old df is in 512 block sizes (1/2 KB).
You could probably work out some kind of alias that would do the math for you, but for the most part a ballpark figure is sufficient. So, if you do a df -k and get a return for a filesystem of 2555904, I would count that as 2.5 GB, even though is is actually 2.4375. 2.5 is close enough. And I'd count a readout of 294912 as about 293 MB, even though it really is just 288.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.