Unix administration - disk space remaining

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > March 2005 > disk space remaining





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author disk space remaining
Lowell Kirsh

2005-02-12, 5:49 pm

How can I check how much space I have left on my hard disk? I use bash,
if that matters.

Lowell
Bev A. Kupf

2005-02-12, 5:49 pm

On Sat, 12 Feb 2005 13:18:58 -0800,
Lowell Kirsh (lkirsh@cs.ubc.ca) wrote:
> How can I check how much space I have left on my hard disk? I use bash,
> if that matters.


`df` should tell you the number of kilobytes used/available on all
mounted partitions. So I suppose you could mount all the partitions
on your disk, and then try `df`.

Beverly
--
Many a smale maketh a grate -- Geoffrey Chaucer
Lowell Kirsh

2005-02-13, 5:50 pm

perfect, thanks.

Bev A. Kupf wrote:
> On Sat, 12 Feb 2005 13:18:58 -0800,
> Lowell Kirsh (lkirsh@cs.ubc.ca) wrote:
>
>
>
> `df` should tell you the number of kilobytes used/available on all
> mounted partitions. So I suppose you could mount all the partitions
> on your disk, and then try `df`.
>
> Beverly

sien0001

2005-02-22, 5:53 pm

If you are anything like me, btye intollerant, than use the ' -h'
switch with df and it will print the amounts of data in human readable
format.

Greg

Greg Beeker

2005-02-23, 8:47 pm


Bev A. Kupf wrote:
> On Sat, 12 Feb 2005 13:18:58 -0800,
> Lowell Kirsh (lkirsh@cs.ubc.ca) wrote:
bash,[vbcol=seagreen]
>
> `df` should tell you the number of kilobytes used/available on all
> mounted partitions. So I suppose you could mount all the partitions
> on your disk, and then try `df`.


Depending on your OS, df may show data reported on 512 byte blocks. I
always use df -k for data reported in 1024 byte blocks.

df
Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 65536 22272 67% 1982 13% /

df -k
Filesystem 1024-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 32768 11136 67% 1982 13% /

>
> Beverly
> --
> Many a smale maketh a grate -- Geoffrey Chaucer


Kevin Collins

2005-02-25, 5:59 pm

In article <1109089154.248373.128720@o13g2000cwo.googlegroups.com>, sien0001
wrote:
> If you are anything like me, btye intollerant, than use the ' -h'
> switch with df and it will print the amounts of data in human readable
> format.


Where besides linux does the '-h' option exist? Not on HP-UX (through 11.23) or
Solaris (5.8)... Its a great option, tho

Kevin
jpd

2005-02-25, 5:59 pm

Begin <slrnd1uotc.m1g.spamtotrash@halo.unix-guy.com>
On 2005-02-25, Kevin Collins <spamtotrash@toomuchfiction.com> wrote:
> In article <1109089154.248373.128720@o13g2000cwo.googlegroups.com>, sien0001
> wrote:
>
> Where besides linux does the '-h' option exist? [... snip a very long line]


I'll add a datapoint: FreeBSD, 4.* and 5.* at least, have it. You could
work through the manpages cgi on freebsd.org; it has collections of
manpages for quite a few releases, both FreeBSD and others.


--
j p d (at) d s b (dot) t u d e l f t (dot) n l .
And I like FreeBSD's df -hi implementation quite a bit better than linux'.
Dragan Cvetkovic

2005-02-25, 5:59 pm

Kevin Collins <spamtotrash@toomuchfiction.com> writes:

> In article <1109089154.248373.128720@o13g2000cwo.googlegroups.com>, sien0001
> wrote:
>
> Where besides linux does the '-h' option exist? Not on HP-UX (through 11.23) or
> Solaris (5.8)... Its a great option, tho
>
> Kevin


Solaris 9 and 10 do have it:

sc2$ /usr/bin/df -kh
Filesystem size used avail capacity Mounted on
/dev/md/dsk/d10 9.6G 2.7G 6.8G 29% /
/proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
fd 0K 0K 0K 0% /dev/fd
swap 2.6G 224K 2.6G 1% /var/run
swap 2.7G 97M 2.6G 4% /tmp

[rest snipped]

sc2$ uname -rs
SunOS 5.9

--
Dragan Cvetkovic,

To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

!!! Sender/From address is bogus. Use reply-to one !!!
Michael Vilain

2005-02-25, 5:59 pm

In article <3896sbF5kul6kU1@individual.net>,
jpd <read_the_sig@do.not.spam.it.invalid> wrote:

> Begin <slrnd1uotc.m1g.spamtotrash@halo.unix-guy.com>
> On 2005-02-25, Kevin Collins <spamtotrash@toomuchfiction.com> wrote:
>
> I'll add a datapoint: FreeBSD, 4.* and 5.* at least, have it. You could
> work through the manpages cgi on freebsd.org; it has collections of
> manpages for quite a few releases, both FreeBSD and others.


MacOS X 10.3.*

--
DeeDee, don't press that button! DeeDee! NO! Dee...



Kevin Collins

2005-02-28, 5:56 pm

In article <lm1xb4y0la.fsf@privacy.net>, Dragan Cvetkovic wrote:
> Kevin Collins <spamtotrash@toomuchfiction.com> writes:
>
>
> Solaris 9 and 10 do have it:
>
> sc2$ /usr/bin/df -kh
> Filesystem size used avail capacity Mounted on
> /dev/md/dsk/d10 9.6G 2.7G 6.8G 29% /
> /proc 0K 0K 0K 0% /proc
> mnttab 0K 0K 0K 0% /etc/mnttab
> fd 0K 0K 0K 0% /dev/fd
> swap 2.6G 224K 2.6G 1% /var/run
> swap 2.7G 97M 2.6G 4% /tmp
>
> [rest snipped]
>
> sc2$ uname -rs
> SunOS 5.9


Nice! Maybe I can submit a feature request for HP-UX to add the option...
Anyone know if AIX has the -h option. If it does, I could argue all the other
competitors have this option so HP-UX needs it

I'm assuming the Solaris 'df' is what you are talking about and its not a GNU
'df' add-on?

Thanks,

Kevin
Alan D Johnson

2005-02-28, 8:50 pm

Kevin Collins wrote:
> In article <lm1xb4y0la.fsf@privacy.net>, Dragan Cvetkovic wrote:
>
>
>
> Nice! Maybe I can submit a feature request for HP-UX to add the option...
> Anyone know if AIX has the -h option. If it does, I could argue all the other
> competitors have this option so HP-UX needs it
>
> I'm assuming the Solaris 'df' is what you are talking about and its not a GNU
> 'df' add-on?
>
> Thanks,
>
> Kevin

on HPUX use bdf
Greg Beeker

2005-03-01, 7:52 am


Kevin Collins wrote:
> In article <lm1xb4y0la.fsf@privacy.net>, Dragan Cvetkovic wrote:
<1109089154.248373.128720@o13g2000cwo.googlegroups.com>, sien0001[vbcol=seagreen]
readable[vbcol=seagreen]
(through 11.23) or[vbcol=seagreen]
>
> Nice! Maybe I can submit a feature request for HP-UX to add the

option...
> Anyone know if AIX has the -h option. If it does, I could argue all

the other
> competitors have this option so HP-UX needs it


Not AIX 51.
$df -h
df: Not a recognized flag: h
Usage: df [-P] | [-IMitv] [-k] [-s] [filesystem ...] [file ...]

>
> I'm assuming the Solaris 'df' is what you are talking about and its

not a GNU
> 'df' add-on?
>
> Thanks,
>
> Kevin


Dragan Cvetkovic

2005-03-01, 6:04 pm

Kevin Collins <spamtotrash@toomuchfiction.com> writes:

> In article <lm1xb4y0la.fsf@privacy.net>, Dragan Cvetkovic wrote:
[vbcol=seagreen]
[vbcol=seagreen]

[snip]
[vbcol=seagreen]
> I'm assuming the Solaris 'df' is what you are talking about and its not a GNU
> 'df' add-on?


What was your question again?

Dragan

--
Dragan Cvetkovic,

To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer

!!! Sender/From address is bogus. Use reply-to one !!!
Kevin Collins

2005-03-01, 8:48 pm

In article <H7PUd.18409$534.10068@twister.nyc.rr.com>, Alan D Johnson wrote:
> Kevin Collins wrote:
> on HPUX use bdf


It still doesn't have a -h option, which was the point we are talking about...

Kevin
Alan D Johnson

2005-03-01, 8:48 pm

Kevin Collins wrote:
> In article <H7PUd.18409$534.10068@twister.nyc.rr.com>, Alan D Johnson wrote:
>
>
>
> It still doesn't have a -h option, which was the point we are talking about...
>
> Kevin

prompt:$ bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 307200 95416 210200 31% /
/dev/vg00/lvol1 295024 60816 204704 23% /stand
/dev/vg00/lvol8 2097152 489768 1595648 23% /var
/dev/vg02/lvol1 4194304 519587 3445099 13% /var/opt/omni
/dev/vg02/lvol2 3145728 62050 2891137 2% /var/opt/omni/backup
/dev/vg01/lvol1 2097152 698911 1310874 35% /var/adm/sw/save
/dev/vg01/lvol6 4194304 1125249 2877246 28% /var/adm/sw/depot
/dev/vg01/lvol2 1310720 1422 1227474 0% /var/adm/crash
/dev/vg00/lvol7 2097152 1268520 822312 61% /usr
/dev/vg00/lvol6 524288 5640 514768 1% /tmp
/dev/vg02/lvol4 4194304 2020267 2039210 50% /scratch/users
/dev/vg02/lvol3 4194304 2891202 1221699 70% /scratch/d03
/dev/vg01/lvol5 2097152 1615 1964573 0% /scratch/d02
/dev/vg01/lvol4 2097152 863527 1156528 43% /scratch/d01
/dev/vg01/lvol3 2097152 43964 1924909 2% /opt2
/dev/vg00/lvol5 2097152 1739600 357552 83% /opt
/dev/vg01/lvol7 3145728 709566 2283922 24% /opt/omni
/dev/vg00/lvol4 262144 9584 250656 4% /home

I understand, I'm one of those people that looks at it and automatically
realizes what is going on, divide by 1024.
Chris F.A. Johnson

2005-03-01, 8:48 pm

On Wed, 02 Mar 2005 at 02:07 GMT, Alan D Johnson wrote:
> prompt:$ bdf
> Filesystem kbytes used avail %used Mounted on
> /dev/vg00/lvol3 307200 95416 210200 31% /
> /dev/vg00/lvol1 295024 60816 204704 23% /stand
> /dev/vg00/lvol8 2097152 489768 1595648 23% /var
> /dev/vg02/lvol1 4194304 519587 3445099 13% /var/opt/omni
> /dev/vg02/lvol2 3145728 62050 2891137 2% /var/opt/omni/backup
> /dev/vg01/lvol1 2097152 698911 1310874 35% /var/adm/sw/save
> /dev/vg01/lvol6 4194304 1125249 2877246 28% /var/adm/sw/depot
> /dev/vg01/lvol2 1310720 1422 1227474 0% /var/adm/crash
> /dev/vg00/lvol7 2097152 1268520 822312 61% /usr
> /dev/vg00/lvol6 524288 5640 514768 1% /tmp
> /dev/vg02/lvol4 4194304 2020267 2039210 50% /scratch/users
> /dev/vg02/lvol3 4194304 2891202 1221699 70% /scratch/d03
> /dev/vg01/lvol5 2097152 1615 1964573 0% /scratch/d02
> /dev/vg01/lvol4 2097152 863527 1156528 43% /scratch/d01
> /dev/vg01/lvol3 2097152 43964 1924909 2% /opt2
> /dev/vg00/lvol5 2097152 1739600 357552 83% /opt
> /dev/vg01/lvol7 3145728 709566 2283922 24% /opt/omni
> /dev/vg00/lvol4 262144 9584 250656 4% /home
>
> I understand, I'm one of those people that looks at it and automatically
> realizes what is going on, divide by 1024.


OTOH, I multiply by 1024 to get the number of bytes.

<OT>
Reminds me of the story of a person in a train muttering to
himself. A fellow passenger asked, "What are you muttering?".

"I'm counting sheep," said the man.

"Don't you find that hard, going by them so fast?"

"Oh no! You see, I just count the legs and divide by four."
</OT>

--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
========================================
===========================
My code (if any) in this post is copyright 2005, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com