Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!aurora!labrea!jade!eris!mwm From: mwm@eris.UUCP Newsgroups: comp.unix.questions Subject: Re: Can't ls -l add file sizes properly?? Message-ID: <5992@jade.BERKELEY.EDU> Date: Thu, 19-Nov-87 20:31:42 EST Article-I.D.: jade.5992 Posted: Thu Nov 19 20:31:42 1987 Date-Received: Sat, 21-Nov-87 18:28:41 EST References: <456@morgoth.UUCP> <1879@celtics.UUCP> Sender: usenet@jade.BERKELEY.EDU Reply-To: mwm@eris.BERKELEY.EDU (Mike (My watch has windows) Meyer) Organization: Missionaria Phonibalonica Lines: 31 In article <1879@celtics.UUCP> roger@celtics.UUCP (Roger B.A. Klorese) writes: glidden@morgoth.UUCP (Ken A. Glidden) writes: <|Why does the ls -l "total" give me 40Kb and my manual addition of the file <|sizes give me 35.7Kb !?!?!?! (Note: This came from Ultrix 2.0 on a DEC uVAX II) < <"ls -l" is counting allocated fragments. Disk is allocated, in this case, in <1KB fragments, so you should add: No - those who said it was counting "1k blocks" (as opposed to allocated fragments - which could be anywhere from 512 bytes to 4K) were right. Along the same lines, the "total" figure is only for the files actually listed. Any files starting with a "." (most importantly, "." itself :-) aren't counted. How did I glean these bits of information? By looking through the source. I realize that not everyone has source, so this route isn't available. But that still doesn't excuse empirical guesswork when others have the source. Please: if you aren't *sure* of your answer (i.e. - it's in the source or documentation in front of you) wait to see if someone posts an answer before posting. If you disagree with them (i.e. - thinking it's fragments intead of 1K blocks) check before posting. If agree - or disagree and were wrong, don't post.