[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] listing sizes of directories..



"Stephen J. Turnbull" wrote:
>     Barrie> How do I list the size of a directory (instead of getting
>     Barrie> the fake size of 4k)?
>  >> That's not a "fake size".  That is the amount of space occupied
>  >> by the directory data.  It gets bigger for sufficiently large
>  >> directories (try `ls -ld /dev' for example).
>Will> rwxr-xr-x 1 root root 0 Jan 1 1970 /dev
>Will> Hmmm? :)
> 
> If that's really your /dev, things are very very broke on your
> system.  Cf my response to Alex.

Broke in terms of what? Size? Looks okay to me.... datestamp, well,
maybe.

> >>>>> "Al" == Alex Hudson <hudson [at] id-pro.co.uk> writes:
>     Al> Running 2.4 by any chance?
> Why yes, I am.  So?  At Skinny Boy Associates, we install no feature
> before its time.

I was asking Will actually, since that would explain the 0-size /dev.

> No, actually I chose a good example, although to prove another point.
> It proves that Linus was right, and still is.

Linus was right about what? devfs?

> It doesn't show up as a
> directory and the time stamp is obviously bogus (were either of you
> born before the epoch?

Nope, got me there ;))

> I doubt your system has been running with
> exactly the same /dev since then!)

So you don't think it's good piece of forward planning ? ;)


> steve [at] turnbull:Dynamics$ ls -ld /proc
> dr-xr-xr-x   71 root     root            0 Sep  4 21:05 /proc
> 
> Note that it is a directory, it has a plausible number of links, and,
> ah, the time stamp is only moderately bogus.  Oh well.  I guess on a
> modern system it doesn't really make sense to update /proc's time stamp
> on every process invocation.

I'm not really sure what the semantics ought to be for a virtual
filesystem. Copying the behaviour as if it were 'real' would be nice,
but strange. It's kind of more like an atom in a quantum state - you
don't know what's there until you read it ;)

> /usr is a terrible example, by the way.  /usr/lib or /usr/include,
> maybe.
> 
> steve [at] turnbull:Dynamics$ ls -ld /usr /usr/lib /usr/include
> drwxr-xr-x   18 root     root         1024 Apr 17 18:43 /usr
> drwxr-xr-x   38 root     root         8192 Sep  7 11:23 /usr/include
> drwxr-xr-x   60 root     root        11264 Sep  7 11:25 /usr/lib

I don't see why /usr is such a terrible example.... ?

-- 
Alex Hudson <hudson [at] ID-PRO.co.uk> * Open Source I.T. 
* ID-PRO UK Ltd. * 1 Benjamin Street * London EC1M 5QG 
* Tel. +44 (0) 20 7689 8448 * Fax +44 (0) 20 7689 8242
* http://www.id-pro.co.uk/
---------------------------------------------------------------------
Sheffield Linux User's Group - http://www.sheflug.co.uk
To unsubscribe from this list send mail to
- <sheflug-request [at] vuw.ac.nz> - with the word 
 "unsubscribe" in the body of the message. 

  GNU the choice of a complete generation.