🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4331

Re: when is a block not a block?

#4331
From: Peter Kittel GERMANY
Date: Thu, 12 Jul 1990 08:02
21 lines
1658 bytes
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
Technical Details
Message-ID: <277@cbmger.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!tut.cis.ohio-state.edu!rutgers!cbmvax!cbmehq!cbmger!peterk
References: <6498.269a4527@vax1.tcd.ie>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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