Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!decwrl!sun!pitstop!sundc!seismo!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.sys.atari.st Subject: Re: Quick Directory Size Keywords: HELP PLEASE TOS Message-ID: <975@philmds.UUCP> Date: 13 Mar 89 17:31:17 GMT References: <305@hydra.gatech.EDU> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 19 In article <305@hydra.gatech.EDU> iadt2tg@prism.gatech.EDU (Terry O. Greenlaw) writes: |What is the quickest way to find out the total byte size of all files |in the current subdirectory? I need the size to do the equivalent of |a "ls -l", and I'd rather not add up the individual file sizes. As far as I know TOS only has a call to get the size (used and unused) of a device (my handbook says: GEMDOS 0x36, Get Disk Free Space; my compiler calls it : Dfree()). So probably summing up the sizes is the only way to go (correct me if I'm wrong). I wrote once a UNIX style du; du -s gives you the number of blocks used by all files in the current directory (recursively); du -a gives the block usage for each file individually too. If that's what you want I could check it out and submit it to the sources / binaries groups. You can try to outperform this by reading the directory sector(s), but I doubt if it's worth the effort. Anyone interested send me fanmail. Leo.