Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an upper limit on .txt file size?

Tags:

People also ask

Does a txt file have a character limit?

A single TXT record has a limit of 255-bytes or characters in a single string, however, multiple strings can be concatenated together in order to construct a longer TXT record when there is a need to.

What is the largest file you can send over text?

Many devices are capable of sending messages that exceed intercarrier file size limits (typically 300-600 KB). A message that exceeds the other carrier's limits may be rejected and won't reach the intended recipient.


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 file. In the morning I would kill the program and take the .txt file to my friend for Christmas.

Is there anything I should be worried about? Bear in mind that this is true beginner Ziggy you are talking to, not some smart error checking ASM guy.

EDIT More specifically, since I will be leaving this program on all night counting primes, is there any chance at all that I will encounter some kind of memory related error? Like, stacks crushing heaps or dogs and cats sleeping together?

EDIT even more specifically, is there a line of code I could put in to stop the printing of lines when the file's size is 4GB? Just to be safe?

EDIT: success: after leaving it on all night I got no more than 13 KB of primes, The highest I got was 22947217, which is like tens of thousands of primes. Success!