LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Basic doubt command LS (Does anyone know the meaning of totals ls command?) (https://www.linuxquestions.org/questions/linux-newbie-8/basic-doubt-command-ls-does-anyone-know-the-meaning-of-totals-ls-command-4175585291/)

perfection 07-22-2016 08:20 AM

Basic doubt command LS (Does anyone know the meaning of totals ls command?)
 
Does anyone know the meaning of totals ls command?
Because:
1) is not the amount of files
2) is not the sum of Bytes
3) is not the sum of the numbers in the second Column
4) is not the size of these folders

Code:

bash-4.3# ls -l
total 48
drwxr-xr-x  5 nik root  4096 Jul 17 07:07 ARTICLES/
drwxr-xr-x  2 nik root  4096 Jul 12 21:38 ARTICLES\ SECUNDARY/
drwxr-xr-x  4 nik root  4096 Jul 19 13:27 DRIVERS/
drwxr-xr-x 10 nik root  4096 Jul 17 07:05 GRAPHICS\ AND\ SOUNDS/
drwxr-xr-x  8 nik root  4096 Jul 19 14:45 THINGS\ AND\ PROGRAMMING/
drwxr-xr-x 11 nik root  4096 Jul 21 18:30 MAINTENANCE/
drwxr-xr-x  4 nik root  4096 Jul  3 20:30 NETWORK\ AND\ INTERNET/
drwxr-xr-x  2 nik root  4096 Jul 14 04:07 NO\ USE/
drwxr-xr-x  2 nik root  4096 Jul  5 01:41 Nepomuk\ e\ Akonadi/
-rw-rw----  1 nik users 5564 Jul 19 08:19 Report\ Programs.htx
drwxr-xr-x  7 nik root  4096 Jul 21 17:34 SO/

bash-4.3# ls -la
total 60
drwxr-xr-x 12 nik root  4096 Jul 19 08:19 ./
drwxr-xr-x  9 nik root  4096 Jul 19 16:04 ../
-rw-rw----  1 nik root    64 Jul  1 03:46 .directory
drwxr-xr-x  5 nik root  4096 Jul 17 07:07 ARTICLES/
drwxr-xr-x  2 nik root  4096 Jul 12 21:38 ARTICLES\ SECUNDARY/
drwxr-xr-x  4 nik root  4096 Jul 19 13:27 DRIVERS/
drwxr-xr-x 10 nik root  4096 Jul 17 07:05 GRAPHICS\ AND\ SOUNDS/
drwxr-xr-x  8 nik root  4096 Jul 19 14:45 THINGS\ AND\ PROGRAMMING/
drwxr-xr-x 11 nik root  4096 Jul 21 18:30 MAINTENANCE/
drwxr-xr-x  4 nik root  4096 Jul  3 20:30 NETWORK\ AND\ INTERNET/
drwxr-xr-x  2 nik root  4096 Jul 14 04:07 NO\ USE/
drwxr-xr-x  2 nik root  4096 Jul  5 01:41 Nepomuk\ e\ Akonadi/
-rw-rw----  1 nik users 5564 Jul 19 08:19 Report\ Programs.htx
drwxr-xr-x  7 nik root  4096 Jul 21 17:34 SO/


Habitual 07-22-2016 08:42 AM

blah.
Chaps my hide that I don't know. Sorry!

michaelk 07-22-2016 09:02 AM

From the ls info pages.
Quote:

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 (*note Block size::). The
BLOCKS computed counts each hard link separately; this is arguably
a deficiency.
You can get the number of blocks for each file via the -s option.

hydrurga 07-22-2016 09:19 AM

Some interesting comments on it here: http://stackoverflow.com/questions/7...ine-after-ls-l

perfection 07-22-2016 01:29 PM

Quote:

Originally Posted by michaelk (Post 15288)
You can get the number of blocks for each file via the -s option.

Quote:

Originally Posted by hydrurga (Post 5579853)
Some interesting comments on it here: http://stackoverflow.com/questions/7...ine-after-ls-l

Thanks for these 2 answers, were great!


All times are GMT -5. The time now is 08:50 AM.