
Jacob C. answered 08/09/20
Master's in Computer Science with 6+ Years Career Experience
There are a couple subtleties here: one has to do with large amounts of data and the other has to do with strange characters.
Large Data
The cat command is going to dump the entire file to your terminal immediately, and it won't stop until it has finished unless you interrupt it with CTRL+C for example. If the file is very large, then this may take quite some time to complete, and your terminal is pretty much locked up in the process. It's also kind of pointless, because you won't have a chance to read everything that's scrolling by that fast, and your terminal emulator scroll buffer probably isn't large enough for you to scroll back that far either.
Strange Characters
A terminal emulator uses ANSI-encoded characters for many things, such as moving the cursor around or changing the colors of text on the screen. While these codes are normally invisible to you, a text file can contain raw ANSI-encoded sequences in it (either intentionally or accidentally). If you run cat on a text file that has ANSI-encoded sequences in it, the terminal will interpret them and that can lead to all kinds of chaos including sometimes locking up your terminal. You may have accidentally ran cat on a binary file before and had this happen by chance.
How To Get Around It
Thankfully, there's an easy solution to this problem. Use the command less instead of cat. less will paginate the file you're trying to read, allowing you to read one page's worth at a time (a page is defined by however big your terminal is). Furthermore, you can always quit at anytime by pressing q, and your terminal isn't locked up. If less isn't available for some reason, an older utility called more also serves a similar function.
Examples
Don't do: cat file.txt
Do: less file.txt
If you're interested to see some more examples (perhaps including how to artificially generate colors from text files using ANSI escape sequences), hit me up.