Total in ls -la
Jeff Vian
jvian10 at charter.net
Wed Nov 8 15:58:55 UTC 2006
On Wed, 2006-11-08 at 14:03 +1030, Tim wrote:
> Fajar Priyanto:
> >> ls -la
> >> total 8
> >> drwxr-xr-x 2 fajar users 4096 2006-11-06 11:12 .
> >> drwxr-xr-x 3 fajar users 4096 2006-11-06 11:12 ..
> >>
> >> What 'total 8' stands for?
>
>
> Jeff Vian:
> > That is the size of the directory and its contents in kB. It is
> > displayed with all 'ls' output using the -l flag.
>
> Are you sure about that? I couldn't find any reference inside Fedora
> about it. Something else, more general about Linux, said it was in
> "blocks."
>
I am sure. See below.
[root at raptor download]# ls -al movie
total 1080028
drwxrwxr-x 2 jeff jeff 4096 Oct 31 2005 .
drwxrwxr-x 110 jeff jeff 4096 Oct 27 18:23 ..
-rw-r--r-- 1 jeff jeff 820366348 Aug 12 2005 myhomemovie.mpg
-rw-r--r-- 1 jeff jeff 284465240 Sep 26 2002 myhomemovie2.mpg
[root at raptor download]# du -s movie
1080020 movie
Note that this only is a valid comparison when the directory in question
is the lowest level as this one is. Du is by design recursive and will
not display the content size correctly when used with this syntax if
there are sobdirectories.
More information about the users
mailing list