LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-16-2003, 06:26 AM   #1
JimDog
Member
 
Registered: Aug 2003
Location: Colorado, USA
Distribution: Fedora Core
Posts: 100

Rep: Reputation: 15
/bin/ls "total" number reported???


This has got to be an easy one, but I can't find the answer anywhere. What exactly is the "total" that is reported when you do an "ls"? I always thought it was the size in MB of the files listed, but it doesn't seem to add up.

Example, when I do a listing in one particular directory (ls -al) I get:

total 43456
drwxrwxrwx 2 root root 4096
drwxrwxrwx 3 root root 4096
-rwxrwxr-x 1 nobody nobody 3701594
-rwxrwxr-x 1 nobody nobody 3108510
-rwxrwxr-x 1 nobody nobody 3070580
-rwxrwxr-x 1 nobody nobody 3099733
-rwxrwxr-x 1 nobody nobody 2602570
-rwxrwxr-x 1 nobody nobody 3184369
-rwxrwxr-x 1 nobody nobody 2903501
-rwxrwxr-x 1 nobody nobody 2981555
-rwxrwxr-x 1 nobody nobody 2063089
-rwxrwxr-x 1 nobody nobody 2892216
-rwxrwxr-x 1 nobody nobody 3057414
-rwxrwxr-x 1 nobody nobody 4142959
-rwxrwxr-x 1 nobody nobody 3906603
-rwxrwxr-x 1 nobody nobody 3694698

Notice that everything adds up to 44,417,583;
but 43456 * 1024 = 44,498,944
 
Old 10-16-2003, 09:08 AM   #2
iainr
Member
 
Registered: Nov 2002
Location: England
Distribution: Ubuntu 9.04
Posts: 631

Rep: Reputation: 30
I believe it is a total of the displayed blocks, including indirect blocks. Block size may vary but in your case you presumably have 1k blocks.
 
Old 03-14-2012, 02:54 PM   #3
Balajisekar
LQ Newbie
 
Registered: Dec 2010
Posts: 2

Rep: Reputation: 0
Smile

Yes, It is the total block size... U can check them with "ls -s" option.

Thanks,
Balaji G
 
Old 03-15-2012, 01:46 PM   #4
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
The info pages for commands like this often go into a lot more detail than the man pages. Check out info ls for a detailed description of all its options.

Code:
`-l'
`--format=long'
`--format=verbose'
     In addition to the name of each file, print the file type, file
     mode bits, number of hard links, owner name, group name, size, and
     timestamp (*note Formatting file timestamps::), normally the
     modification time.  Print question marks for information that
     cannot be determined.

     Normally the size is printed as a byte count without punctuation,
     but this can be overridden (*note 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 (*note Block size::).  The
     BLOCKS computed counts each hard link separately; this is arguably
     a deficiency.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem "make"ing gtk+ "/usr/bin/env: perl -w" caid Linux - Newbie 8 07-29-2005 04:51 AM
open ".cu " and ".bin " on linux j.vilon Linux - General 17 11-19-2004 12:45 PM
Total noob seeking "where to start" advice DJchicago Linux - Newbie 1 09-06-2004 09:44 PM
what is "S" instead of "X" in the file permission when i look at /usr/bin/chsh? Linux_interest Linux - Newbie 4 08-28-2004 09:22 AM
"undeclared identifier is reported only once for each " KDel Linux - Software 1 04-29-2004 05:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:30 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration