Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!hao!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!codas!killer!jfh From: jfh@killer.UUCP (The Beach Bum) Newsgroups: comp.unix.questions Subject: Re: Can't ls -l add file sizes properly?? Message-ID: <2148@killer.UUCP> Date: Thu, 19-Nov-87 15:49:34 EST Article-I.D.: killer.2148 Posted: Thu Nov 19 15:49:34 1987 Date-Received: Sun, 22-Nov-87 11:56:57 EST References: <456@morgoth.UUCP> Organization: Big "D" Home for Wayward Hackers Lines: 53 Summary: 'Cause you can't add either ... In article <456@morgoth.UUCP>, glidden@morgoth.UUCP (Ken A. Glidden) writes: > # ls -l > total 40 > -rwxr--r-- 1 glidden 2117 Aug 6 12:17 acctrpt > -rwxr--r-- 1 glidden 179 Mar 2 1987 age.csh > -rwxrwxr-- 1 root 1308 Aug 4 16:39 arcjobs.sh > -rwxr-x--- 1 glidden 29696 Mar 2 1987 deltime > -rwxr--r-- 1 glidden 269 Sep 9 1986 mailbarry > -r-xr--r-- 1 glidden 296 Aug 25 1986 mailjim > -rwxr--r-- 1 glidden 728 Jan 7 1987 newsindex > -rw-r--r-- 1 root 1132 Aug 4 14:11 tmp > ====== > SUBTOTAL------> 35,725 No, adding up the number of blocks in each file gives you acctrpt 3 age.csh 1 arcjobs.sh 2 deltime 29 mailbarry 1 mailjim 1 newsindex 1 tmp 2 total 40 blocks exactly. > **** > 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) Because, Oh Great Dweeb, ls reports in blocks, and since the entire block must be used, it tells you just how big the file is IN BLOCKS. Try it on an old system - BUT THEN - the entire world is running on a Vax! For the next part, how you divided 35,725 bytes by 1024 and came up with 35.7 KB is beyond me. I did the division and came up with 34.887 KB. > LIVE: Ken A. Glidden, (617) 969-0050 Is this guy a yuppy undergrad? What is it with these undergrads anyway? Oh yes, time for a yuppy joke. What is the difference between a yuppy and a pigeon? The pigeon can still make a deposit on a BMW. - John. -- John F. Haugh II SNAIL: HECI Exploration Co. Inc. UUCP: ...!ihnp4!killer!jfh 11910 Greenville Ave, Suite 600 ...!ihnp4!killer!rpp386!jfh Dallas, TX. 75243 "Don't Have an Oil Well? Then Buy One!" (214) 231-0993