Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

disk space & mount points

0 views
Skip to first unread message

Robin Henderson

unread,
Feb 16, 2002, 8:29:17 PM2/16/02
to
Hi,

Can someone remind me of the command that shows you the disk space taken up by
a directory, and how much space you've left on a partition (not quota)? I
think I found it a while ago while browsing the man pages, but can't remember
now :-(

And would that command show space across partitions? eg, if 2 sub-directories
are on 2 diff. partitions, does it show the total space across both partitions
if you run the following?

<command> / <- root dir

Also, how does one check which partiton a mount point is mounted on? eg I have
my /usr & /home on 2 different partitions (set up during installation), but
how do I check which is on which?

FYI, I'm using Debian 2.2r2.

thanks heaps, have a good one

Robin


Paul Colquhoun

unread,
Feb 16, 2002, 10:20:02 PM2/16/02
to


'du' (Disk Usage) shows how much space a directory uses. Normally it
does cross partitions, but the GNU version that Linux distributions use
has an option to restrict itself to one partition.

'df' (Disk Free) shows how much space is left on partitons. It will also
tell you which partition a file is on. Just run:

df /path/to/file

and it will tell you the stats for the partition the file is on.

The file /etc/fstab also has all the information on what directories use
which partitions.


--
Reverend Paul Colquhoun, ULC. http://andor.dropbear.id.au/~paulcol
Asking for technical help in newsgroups? Read this first:
http://www.tuxedo.org/~esr/faqs/smart-questions.html

Robin Henderson

unread,
Feb 16, 2002, 10:29:05 PM2/16/02
to
great, thanks Paul!

Christian

unread,
Feb 16, 2002, 9:53:40 PM2/16/02
to
Robin Henderson wrote:

> Can someone remind me of the command that shows you the disk space taken up by
> a directory, and how much space you've left on a partition (not quota)? I


taken up by a directory: "du /dir" (i'm using "du -cah /dir"
("man du")

space left on partitions: "df /mount-point" (man df)

> And would that command show space across partitions? eg, if 2 sub-directories
> are on 2 diff. partitions, does it show the total space across both partitions
> if you run the following?
>
> <command> / <- root dir


take the "df" command without partition-paramters, e.g. "df -h" (the
"-h" is for "human-readable") will show you all partitions currently
mounted.

> Also, how does one check which partiton a mount point is mounted on? eg I have
> my /usr & /home on 2 different partitions (set up during installation), but
> how do I check which is on which?


again: df


> FYI, I'm using Debian 2.2r2.


FYI, Debian 2.2r6 is coming soon :-)


peace,
Christian.

--
########### Christian ###############
######## evil...@gmx.net ######
#####################################

0 new messages