LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-28-2003, 09:31 AM   #1
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Rep: Reputation: 45
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.
 
Old 10-28-2003, 09:52 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
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.
 
Old 10-28-2003, 09:58 AM   #3
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
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.
 
Old 10-28-2003, 10:02 AM   #4
slakmagik
Senior Member
 
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
Yep. 27972233KB=26.6764GB (about)
 
Old 10-28-2003, 10:07 AM   #5
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
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...
 
Old 10-28-2003, 11:54 AM   #6
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
no -h switch???
 
Old 10-28-2003, 12:08 PM   #7
itsjustme
Senior Member
 
Registered: Mar 2003
Location: Earth
Distribution: Slackware, Ubuntu, Smoothwall
Posts: 1,571

Original Poster
Rep: Reputation: 45
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help understanding ln dr_zayus69 Linux - General 3 01-14-2005 08:33 PM
A better understanding! nny0000 Slackware 1 04-14-2004 12:01 PM
Understanding X?? ++ bdp Linux - General 2 02-25-2004 05:47 PM
Understanding X?? nny0000 Linux - General 2 02-25-2004 02:07 AM
understanding dmesg shanenin Linux - Software 2 12-13-2003 03:00 PM


All times are GMT -5. The time now is 10:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration