Operating System - HP-UX
1833901 Members
1885 Online
110063 Solutions
New Discussion

Re: ls -l and ll commands

 
SOLVED
Go to solution
Berd
Trusted Contributor

ls -l and ll commands

Just out of interest, when you runa ll or ls -l command, what does the 'total' value relate to. For example in the below, 2280 ?????

root on paris[cdrom] ls -l
total 2280
-r-xr-xr-x 1 root sys 179 Dec 10 2004 CDLABEL.ASC
-r-xr-xr-x 1 root sys 179 Dec 10 2004 CDLABEL.EBC
-r-xr-xr-x 1 root sys 7922 Dec 10 2004 COPY_TM.HTM
-r-xr-xr-x 1 root sys 5296 Dec 10 2004 COPY_TM.TXT
-r-xr-xr-x 1 root sys 1128918 Dec 10 2004 CRCFILE.DAT

......


Regards,
Berd
6 REPLIES 6
Robert-Jan Goossens_1
Honored Contributor
Solution

Re: ls -l and ll commands

Hi Berd,

It is the total number of 512 bytes blocks. Try is with the -s option.

# ls -s

Regards,
Robert-Jan
James R. Ferguson
Acclaimed Contributor

Re: ls -l and ll commands

Hi:

The manpages for 'ls' would tell you this, but its the total block count that you see at the listing's beginning.

Regards!

...JRF...
Peter Godron
Honored Contributor

Re: ls -l and ll commands

Reshma Malusare
Trusted Contributor

Re: ls -l and ll commands

Hi Berd,
Total means total number of blocks used there.
Refer man pages for ll command.

Regards,
Reshma
Berd
Trusted Contributor

Re: ls -l and ll commands

Cheers for the responses, I had taken a look at the manpages but could see no reference to this.

Berd
Dennis Handly
Acclaimed Contributor

Re: ls -l and ll commands

>Robert-Jan: It is the total number of 512 bytes blocks.

Thanks, I've always thought it was garbage, something to do with directory sizes.

>I had taken a look at the manpages but could see no reference to this.

You need to look at the bottom:
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.