Home > Archive > alt.os.linux > December 2002 > Newbie: Which partition is directory on?





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 Newbie: Which partition is directory on?
runstein

2002-12-10, 3:25 pm

I hope this isn't a stupid question:

If I run df, I can see /, /boot, /home, etc, along with the amount of free
space. I can't however see /etc, /dev, /local, etc.

How do I tell how much room the partition with /etc has?



Richard Adams

2002-12-10, 4:24 pm

In article <uvcmh3mm6jil9f@corp.supernews.com>, "runstein"
<replytogroup@sickofspam.com> wrote:

> I hope this isn't a stupid question:
>
> If I run df, I can see /, /boot, /home, etc, along with the amount of
> free space. I can't however see /etc, /dev, /local, etc.


If you have /etc in its own partition then you "will" see it with 'df' i
susspect you dont have it mounted on its own partition that is not a
normal thing to do, not with /etc, possable yes, unlikly no.

>
> How do I tell how much room the partition with /etc has?


du -m /etc

man du for more details.

--
Regards Richard
pa3gcu@zeelandnet.nl
http://people.zeelandnet.nl/pa3gcu/
don_pettengill@spamgilent.com

2002-12-10, 5:24 pm

runstein <replytogroup@sickofspam.com> wrote:
: I hope this isn't a stupid question:

: If I run df, I can see /, /boot, /home, etc, along with the amount of free
: space. I can't however see /etc, /dev, /local, etc.

: How do I tell how much room the partition with /etc has?

/etc is on the / partition, apparently.

To see the disk space available for any directory:

cd <the directory> ; df .

is the easiest way. No need to fuss over seeing what is mounted where.

I suggest you do some reading on Unix, as this is a pretty basic
concept. My old favorite is:

The Unix programming Environment

by Brian W. Kernighan and Rob Pike.
Prentice Hall, Inc., 1984.
ISBN 0-13-937681-X (paperback), 0-13-937699-2 (hardback).

I used that when it first came out, maybe in an earlier edition ...
likely I am quite obsolete :-) I'll let others add their suggestions,
assuming you get any in between the flames -) If you search on Amazon or
google you will find many good modern books and on-line references.

Don Pettengill
Agilent Laboratories
Robert Newson

2002-12-10, 5:24 pm

runstein wrote:

> I hope this isn't a stupid question:
>
> If I run df, I can see /, /boot, /home, etc, along with the amount of free
> space. I can't however see /etc, /dev, /local, etc.
>
> How do I tell how much room the partition with /etc has?



The *nix filing tree starts with the root directory, aka '/', which is in a
specific partition (eg /dev/hda1). To access other partitions seamlessly,
*nix mounts (see: $ man 8 mount) them onto this filing tree at specific
directories. Thus, you may have partition '/dev/hda2' mounted at '/home'.
As *nix traces a file down this tree, it automatically jumps across the
partitions (or machines if the partition is on another machine!) as necessary.

So, not having a '/etc' partition tells you that it resides on (as part of)
another partiton. But which one? Trace back up its path directories until
you meet a known partition. In this case, the parent of '/etc' is '/',
which is a known partition. So '/etc' resides on the '/' partition.

eg for the file '/home/fred/bloggs', the parent of 'bloggs' is '/home/fred'
- not a partition, trace up... the parent of 'fred' is '/home' - a
partition. So '/home/fred/bloggs' resides on the '/home' partition.

If you want to know how much space the '/etc' tree is using of the '/'
partition, try the 'du' command:

#man du
DU(1) FSF DU(1)

NAME
du - estimate file space usage

SYNOPSIS
du [OPTION]... [FILE]...

DESCRIPTION
Summarize disk usage of each FILE, recursively for direc_-
tories.
....
# du -s /etc
6716
/etc

Chris F.A. Johnson

2002-12-10, 5:24 pm

On Tue, 10 Dec 2002 at 21:14 GMT, runstein wrote:
> I hope this isn't a stupid question:
>
> If I run df, I can see /, /boot, /home, etc, along with the amount of free
> space. I can't however see /etc, /dev, /local, etc.
>
> How do I tell how much room the partition with /etc has?


If it doesn't show up with df, it's not on its own partition.

Use:

df /etc /usr ...

--
Chris F.A. Johnson bq933@torfree.net
==============================
==============================
=====
c.f.a.johnson@rogers.com http://cfaj.freeshell.org
cfaj@freeshell.org http://members.rogers.com/c.f.a.johnson
Miguel Angel Sotomayor

2002-12-10, 5:24 pm

If you don't see /etc, /dev, /local, etc., and just see /boot, /home,
then all these partitions (wich you dont see in df) are under / (root),
so, the free space available for all of these is the free space in your
/ partition.

runstein wrote:
> I hope this isn't a stupid question:
>
> If I run df, I can see /, /boot, /home, etc, along with the amount of free
> space. I can't however see /etc, /dev, /local, etc.
>
> How do I tell how much room the partition with /etc has?
>
>
>



--
______________________________
___________
Ing. Miguel Ángel Sotomayor Hdez.

Efectividad Institucional
Tec de Monterrey, Campus Querétaro
Tel (01 442) 238 3306
Tel 80776 3306 (Intercampus)

Miguel Angel Sotomayor

2002-12-10, 6:24 pm

I said: all these partitions (wich you dont see in df) are under / (root),

I meant: all these directories (not partitions)

Miguel

Miguel Angel Sotomayor wrote:
> If you don't see /etc, /dev, /local, etc., and just see /boot, /home,
> then all these partitions (wich you dont see in df) are under / (root),
> so, the free space available for all of these is the free space in your
> / partition.
>
> runstein wrote:
>
>> I hope this isn't a stupid question:
>>
>> If I run df, I can see /, /boot, /home, etc, along with the amount of
>> free
>> space. I can't however see /etc, /dev, /local, etc.
>>
>> How do I tell how much room the partition with /etc has?
>>
>>
>>

>
>


Brian Schwarz

2002-12-10, 6:24 pm


<don_pettengill@spamgilent.com> wrote in message
news:1039556969.841211@emperor.labs.agilent.com...
> runstein <replytogroup@sickofspam.com> wrote:

<snip>
> To see the disk space available for any directory:
>
> cd <the directory> ; df .
>
> is the easiest way. No need to fuss over seeing what is mounted where.


Another useful command if you want to know how much space a directory is
using is 'du -hs /directory_name"

Example:
# du -hs /etc/
17M /etc

The -s specificies a summary rather than listing each file individually, and
the -h specifies "human-readable" (i.e. translate from bits to K, M, or G as
appropriate).

Cheers,

Brian


--
-----------------------------
The opinions expressed here are my own
and do not reflect those of my
employers - past, present, or future.


Sponsored Links





Free Braindumps | MCSE braindumps software forum

Copyright 2003 - 2008 examnotes.net