Is there an upper limit on .txt file size?

前端 未结 11 2359
礼貌的吻别
礼貌的吻别 2021-02-18 14:03

As a Christmas gift I have written a small program in Java to calculate primes. My intention was to leave it on all night, calculating the next prime and writing it to a .txt fi

相关标签:
11条回答
  • 2021-02-18 14:04

    There's plenty of limits, though none of them are intrinsic to .txt files:

    • Windows 9x Notepad won't open a file > 64KB.
    • Windows NT/2k/etc's Notepad has no limit, but tends to choke and lock up on multi-megabyte files. You also need to remember most text editors are dumb and try to read the entire file into RAM.
    • Lots of software is limited to 2GB or 4GB files depending on whether they use signed or unsigned ints - as someone already mentioned FAT32 is guilty of this.
    0 讨论(0)
  • 2021-02-18 14:05

    I would recommend sending an SMS message for each prime you calculate. Your friend would like that much better than a bunch of paper. Plus he can be updated much more often.

    0 讨论(0)
  • 2021-02-18 14:09

    If memory serves, FAT32 has a 4gig file limit size.

    0 讨论(0)
  • 2021-02-18 14:10

    Ziggy--

    I love this: "not some smart error checking ASM guy." You are describing all of us!

    Have plenty of disk space and write away! As previously mentioned, be sure the editor used to open your file can open very large files.

    Happy holidays, true beginner Ziggy.

    0 讨论(0)
  • 2021-02-18 14:13

    More than likely you are using an algorithm that is slow. As the primes get larger your program will be taking longer and longer to calculate a single prime. If you let it run over night the text file is not going to be very large in the morning. I'd be impressed if it's over a couple of megs.

    0 讨论(0)
  • 2021-02-18 14:14

    Technically, there is no limit except that which the file system places on you. However, Notepad is really cranky about opening obscenely large files.

    0 讨论(0)
提交回复
热议问题