auyantepui# ls -l
total 18
drwxr-xr-x 2 root sys 512 May 23 13:11 READMEs/
drwxr-xr-x 2 root sys 1024 May 23 13:11 bin/
drwxr-xr-x 2 root sys 512 May 23 13:09 docs/
drwxr-xr-x 2 root sys 512 May 23 13:09 examples/
drwxr-xr-x 3 root sys 512 Mar 31 2004 inventory/
drwxr-xr-x 4 root sys 1536 May 23 13:11 lib/
drwxr-xr-x 11 root sys 512 May 23 13:11 man/
drwxr-xr-x 6 root sys 512 May 23 13:11 prod/

in this command what base get the total 18 please explain in detail

link|improve this question
1  
You should probably ask this over on superuser.com. It's not really a programming question. You might want to, however, as a hint, check out man ls for details. – JUST MY correct OPINION Aug 20 '10 at 8:16
feedback

migrated from stackoverflow.com Aug 22 '10 at 4:35

This question came from our site for professional and enthusiast programmers.

1 Answer

It he total disc allocation from the content of this directory :

-l' --format=long' `--format=verbose'

   In addition to the name of each file, print the file type,
   permissions, number of hard links, owner name, group name, size,
   and timestamp (see section 10.1.6 Formatting file timestamps),
   normally the modification time. 

   Normally the size is printed as a byte count without
   punctuation, but this can be overridden (see section 2.2 Block
   size). For example, `-h' prints an abbreviated, human-readable
   count, and `--block-size="'1"' prints a byte count with the
   thousands separator of the current locale.

   For each directory that is listed, preface the files with a line
   `total blocks', where blocks is the total disk allocation for
   all files in that directory. The block size currently defaults
   to 1024 bytes, but this can be overridden (see section 2.2 Block
   size). The blocks computed counts each hard link separately;
   this is arguably a deficiency.
link|improve this answer
feedback

Your Answer

 
or
required, but never shown