[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] Mac File 'GetInfo' Size Descrepancies



At 18.05 +0200 98-05-26, Greg Aiken wrote:
>a. Whats the significance of the two numbers? and

The second is the true size of the file in bytes, while the first is the
amount of space on the disk that the file occupies.

Disks are divided into blocks, which is the minimum unit of disk space. A
file must occupy an integer number of blocks, so all files will occupy more
space than they need to store their data.

>b. Why is it that if the same file is copied to/from a floppy and a hard
>disk, the values shown for 'on disk' will be different on the floppy
>than will be shown for the hard disk?

The blocks are much smaller on a floppy disk (about 1 kbyte) that on a hard
disk (about 38 kbyte on mine). This means that if I put a 10 byte file on a
floppy disk, it will occupy about 1 kbyte. If I put the same file on my
hard disk, it will be 38 kbyte. If I increase the file size to 35 kbyte, it
will still occupy 38 kbyte on my hard disk, but if I put it back on the
floppy, it will be about 35 kbyte.

The new file system, HFS+, that comes with MacOS 8.1 makes the blocks
smaller on big disks, and hence saves you disk space.


___Carl_Johan_Berglund_________________________
   Adverb Information
   carl.johan.berglund@adverb.se
   http://www.adverb.se/



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch