lkml.org 
[lkml]   [1999]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: why is the size of a directory always 1024b ?
On Wed, 23 Jun 1999, Riley Williams wrote:
[snippage]
> I can understand the viewpoint that says the "size" of a directory is
> simply a count of the number of valid entries therein, but I don't
> agree with it.

What I think the original poster objects to is that this makes directory
files different from nondirectory files, without giving a good reason.
When I ls -l a text file or a program or... I see the number of useful
bytes in it, but when I ls -l a directory I see the number of *allocated*
bytes in it.

I suppose one could consider this a feature: it makes life difficult for
people who want to interpret directory files themselves instead of letting
the kernel do it. But this violates the bag-of-bytes model that is
supposedly sacred. Everything is a file, but some files are more
file-like than others.

--
Mark H. Wood, Lead System Programmer mwood@IUPUI.Edu
A Brazil-nut is neatly packaged and tightly integrated. To turn it into
food, you must crack and remove the shell. I find that I feel the same
way about an increasing number of software products. *sigh*


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.098 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site