Path: utzoo!attcan!uunet!snorkelwacker!tut.cis.ohio-state.edu!rutgers!cbmvax!cbmehq!cbmger!peterk From: peterk@cbmger.UUCP (Peter Kittel GERMANY) Newsgroups: comp.sys.amiga.tech Subject: Re: when is a block not a block? Message-ID: <277@cbmger.UUCP> Date: 12 Jul 90 08:02:34 GMT References: <6498.269a4527@vax1.tcd.ie> Reply-To: peterk@cbmger.UUCP (Peter Kittel GERMANY) Organization: Commodore Bueromaschinen GmbH, West Germany Lines: 21 In article <6498.269a4527@vax1.tcd.ie> cpmurphy@vax1.tcd.ie writes: >How do I get the "real" number of blocks taken up by a file so as to avoid this >bug? Say I have a file on a HD and I want to copy it to a floppy. How do I >ensure that there is enough space on the floppy for this file? One file on floppy or HD consists of one header block plus a number of data blocks. Now it depends on which filesystem is used, how many data bytes fit into one media sector. On HD's today mostly the FastFilingSystem is used, it contains 512 data bytes per sector. However on floppy still the old filesystem is used normally which contains only 488 data bytes per sector (plus some organisational overhead). So there well can arise a difference in number of blocks needed on HD vs. floppy. You may take the said numbers to compute the needed blocks when you know the file length in bytes. (To further confuse you: in future we perhaps will see other filesystems or media with not only 512 bytes per block, but 1024. Then the difference will be again different...) -- Best regards, Dr. Peter Kittel // E-Mail to Commodore Frankfurt, Germany \X/ rutgers!cbmvax!cbmger!peterk