Is there an upper limit on .txt file size?

前端 未结 11 2367
礼貌的吻别
礼貌的吻别 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:22

    Somehow I doubt that when having your program run overnight, that the filesize will be a problem, considering that it will take longer to find primes as numbers get bigger. Just make sure you clean up or you might eat up all your RAM.

    To answer your question: Theoretically, the filesystem restricts file size. However, a lot of text editors crash (vim does not) when loading big files (> 100 MB), because they try to fit it in one buffer.

    To sum up, consider splitting up your files into chunks the weakest link (text editors) can handle.

提交回复
热议问题