Large files on the Unix PC

John B. Milton jbm at uncle.UUCP
Sat Dec 3 17:22:41 AEST 1988


In article <5466 at rphroy.UUCP> tkacik at rphroy.UUCP (Tom Tkacik) writes:
>The documentation for the UnixPC says that there is a 1 Meg limit on the
>size of files.  I have used files that are larger than this.
>The largest was about 1.4Meg.  Does anyone know what the real limit is?
>Am I playing with fate by having files of this size?
>I thought that Unix files were able to be much larger than this.
>What is it about the UnixPC that makes a limit like this?

The real limit on file sizes has to do with the longest list of blocks your
files system can create.

Things that affect this:
 The size of your blocks (512)
 How many bytes are used to number the blocks (3)

 blocks listed in the i-node          (13)
 blocks listed in the first indirect  (170)
 blocks listed in the second indirect (170*170=28900)
 blocks listed in the third indirect  (170*170*170=4913000)
For a total of 4942083 blocks of 512 bytes=2530346496 bytes
The number of bytes in the file is also saved in the i-node as a 32 bit number.

The default limit (ulimit(2)) for users on the UNIXpc is 2147483647.
I HAVE created 2 gig files on the UNIXpc, so I know it works.

Because of the indirect blocks, the du(1) of a file is larger than the size of
the file when the size exceeds 13 blocks and allocates an indirect block

John
-- 
John Bly Milton IV, jbm at uncle.UUCP, n8emr!uncle!jbm at osu-cis.cis.ohio-state.edu
(614) h:294-4823, w:764-2933;  Got any good 74LS503 circuits?



More information about the Comp.sys.att mailing list