1847235 Members
2780 Online
110263 Solutions
New Discussion

Re: long listing

 
SOLVED
Go to solution
Rusty Sapper
Frequent Advisor

long listing

when doing a ll (ls -l) what does the 'total:' number mean at the top of the output?

somtimes there will be a 0 when there are 5 items, and sometimes it will have a 32 when there are 2 items.

TIA
8 REPLIES 8
S.K. Chan
Honored Contributor
Solution

Re: long listing

This is a total count of blocks, including indirect blocks.
Michael Tully
Honored Contributor

Re: long listing

Hi,

This is listed in the man page of 'ls'
/Quote
"a total count of blocks, including indirect blocks, is also printed at the beginning of the listing."

-Michael
Anyone for a Mutiny ?
Scott Van Kalken
Esteemed Contributor

Re: long listing

From the man page:

When an option is specified that results in a listing of directory
and/or file sizes in bytes or blocks (such as the -s or -l (ell)
option), a total count of blocks, including indirect blocks, is also
printed at the beginning of the listing.

So I'm tipping it's blocks.
Uday_S_Ankolekar
Honored Contributor

Re: long listing

Hi,
This is number of block count

-USA..
Good Luck..
Rusty Sapper
Frequent Advisor

Re: long listing

Thanks ALL of you.

define "Indirect Block" please.



Geoff Wild
Honored Contributor

Re: long listing

I think that is either the number of blocks or inodes used by the current directory to store the contents...



Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: long listing

Indirect blocks are used by inodes:

Unix uses a tree structure to store the block list. The structure is called an inode.
The inode holds the first 10 block numbers used by the file. If the file grows larger, a disk block is used to store further block numbers; this is a single indirect block.

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Michael Tully
Honored Contributor

Re: long listing

Hi,

The indirect blocks would be the current directory itself and any sub-directory that it may have.

-Michael
Anyone for a Mutiny ?