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!wnp From: wnp@killer.UUCP (Wolf Paul) Newsgroups: comp.unix.questions Subject: Re: Can't ls -l add file sizes properly?? Message-ID: <2192@killer.UUCP> Date: Mon, 23-Nov-87 10:46:47 EST Article-I.D.: killer.2192 Posted: Mon Nov 23 10:46:47 1987 Date-Received: Fri, 27-Nov-87 02:06:40 EST References: <456@morgoth.UUCP> Reply-To: wnp@killer.UUCP (Wolf Paul) Organization: The Unix(tm) Connection BBS, Dallas, Tx Lines: 23 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 > ... lines deleted ... > ====== >SUBTOTAL------> 35,725 > >**** >Why does the ls -l "total" give me 40Kb and my manual addition of the file >sizes give me 35.7Kb !?!?!?! ... Because the ls command total gives the total diskspace occupied by the files, and thus always gives a multiple of 1 block - usually 512 bytes or 1 KB. The file sizes displayed for each entry however is the actual length of the file, disreagarding unused partial disk blocks. Each file, even if it contains only 1 character, occupies at least one disk block, therefore ls would display a total of 1 block but a filesize of 1 character. Wolf Paul ihnp4!killer!dcs!wnp