LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Understanding df -k (https://www.linuxquestions.org/questions/linux-general-1/understanding-df-k-109478/)

itsjustme 10-28-2003 09:31 AM

Understanding df -k
 
I tried searching on "df -k", but apparently the search utility requires a 3 character, contiguous string.

Anyway, so, I have df -k, and part of that out put is:
Code:

filesystem......................avail......capacity....mounted on
swap...........................835968.........1%....../var/whatever
swap...........................835968.........1%....../tmp
/dev/dsk/c0t2d0s0..............27972233......27%....../opt/whatever

Is that 27 Gigabytes or 27 Megabytes. I think it's giga.
And 835 megabytes for the swaps.

Is that right? This seems like a dumb question, but I just want to be sure. I need a 512MB slice for an upgrade.

This is a solaris system, but the df -k question is apropos to Linux also.

Bruce Hill 10-28-2003 09:52 AM

You can get this by
$ man df
The -k switch stands for block-size, but I get the same thing on Debian with df and no -k. Do
$ df -h
to see the sizes in human readable (-h). Here's an example:

paul:~> df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda6 942M 45M 850M 6% /
/dev/hda7 92M 5.9M 81M 7% /boot
/dev/hda8 3.8G 268M 3.5G 8% /usr
/dev/hda9 23G 41M 23G 1% /home
/dev/hda10 2.9G 33M 2.8G 2% /mnt/debs
/dev/hdb5 1.9G 113M 1.8G 6% /usr/lib
/dev/hdb6 2.4G 33M 2.3G 2% /usr/local
/dev/hdb7 3.8G 149M 3.6G 4% /usr/share
/dev/hdb8 957M 87M 871M 10% /usr/X11R6
/dev/hdb9 2.8G 299M 2.6G 11% /var
/dev/hdb11 30G 5.0G 25G 17% /mnt/AppSwap
tmpfs 440M 8.0K 440M 1% /tmp

paul:~> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda6 964500 45888 869616 6% /
/dev/hda7 93309 5966 82526 7% /boot
/dev/hda8 3903636 273932 3629704 8% /usr
/dev/hda9 23438080 41384 23396696 1% /home
/dev/hda10 2947800 32840 2914960 2% /mnt/debs
/dev/hdb5 1951800 115388 1836412 6% /usr/lib
/dev/hdb6 2441768 32840 2408928 2% /usr/local
/dev/hdb7 3903636 152168 3751468 4% /usr/share
/dev/hdb8 979896 89000 890896 10% /usr/X11R6
/dev/hdb9 2931732 305900 2625832 11% /var
/dev/hdb11 30709264 5198544 25510720 17% /mnt/AppSwap
tmpfs 450040 8 450032 1% /tmp

Sorry the formatting's sloppy. I just barely got any system up here. Basic tools and Mozilla. Just compiled a 2.4.22 kernel and came online to try to find out how to get 4 separate modules in with it.

itsjustme 10-28-2003 09:58 AM

There's no -h switch for df on this system.

I just want to make sure that the -k, "Print the allocation in Kbytes", indicates that I need to add ",000" to the end of the "avail" output.

slakmagik 10-28-2003 10:02 AM

Yep. 27972233KB=26.6764GB (about)

itsjustme 10-28-2003 10:07 AM

Quote:

Originally posted by digiot
Yep. 27972233KB=26.6764GB (about)
Ok, yeah, I understand that.

I just wanted to make sure that's what the df -k output was indicating. Seems like a no brainer, but I've misread stuff before. ;)

Thanks...

Robert0380 10-28-2003 11:54 AM

no -h switch???

itsjustme 10-28-2003 12:08 PM

Nope. Solaris 8, SunOS 5.8

I read somewhere that it was added in Solaris 9, which, incidentally, is what we are trying upgrade to.


All times are GMT -5. The time now is 10:50 PM.