[BBLISA] silly unix 'ls' question

Jeff Ambrosino jbambrosino at gmail.com
Wed Aug 2 10:43:16 EDT 2006


Aha...  this is very helpful.

thanks you!
JB


On 8/2/06, David Krikorian <dkk at mit.edu> wrote:
> On 8/2/06, Jeff Ambrosino <jbambrosino at gmail.com> wrote:
> > when you run "ls -l" what do the two numerical columns represent for directory entries?
> > I know they mean hardlinks and bytes for _files_, but what are they for directories?
>
> Same thing, as directories are just special files.
>
> > e.g.:
> >
> > drwxrwxrwx   1 root  root    3813688 Aug  1 14:09 MyDirectory
> >
> > So what are the "1" and "3813688" numbers?
>
> The '1' means that only 1 directory has that name, which is highly unusual.
> You should have a minimum of '2', one for "MyDirectory" in the parent dir, and
> one for "." in the "MyDirectory" dir.  Each of those two directories
> (itself and its
> parent) has a name that refers to that directory node.
>
> The number will be higher if there are subdirectories of MyDirectory, as each
> of those subdirs will also have a ".." entry referencing the node you know as
> MyDirectory.
>
> The other number is the number of bytes consumed by the directory file.  If you
> add contents to MyDirectory, at some point it runs out of free bytes
> to store the
> names for those files, and needs to grow in size.
>




More information about the bblisa mailing list