Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • OK, cool. Thanks for the answer. You mention a "text mode". Are there other modes for a standard terminal? Or, is the only other way to interpret it like you said, via an application that can properly render that filetype? Commented Apr 26, 2011 at 2:34
  • 4
    @BOSS, no, I believe gordoco meant to say that a terminal is a text device. The original purpose of cat is to put files together as in cat filea fileb > filec, if you don't transit via the terminal (as in this example) then it does not matter whether the file if text or binary. In the unix world, binary and text files are stored the same, only text files contain a somewhat restricted set of bytes. A common use of cat is to direct file contents to commands that do not take file names as parameters, but accept input from the standard input. Commented Apr 26, 2011 at 3:25
  • @BOSS, saying a file is a text file as opposed to binary, only means that the file's binary content can be interpreted as text. Things used to be simple, either the file was ASCII or it was not. Nowadays the file could be a number of different text formats, including ASCII, UTF8, UTF16... On the hard drive they are all binary. Commented Apr 26, 2011 at 3:30
  • @asoundmove: You are correct, I should have said text device, rather than the ambiguous term "text mode". I've edited my response. Commented Apr 27, 2011 at 13:32
  • I used cat on a bitmap just now and it printed to terminal not just ascii symbols, but also unicode characters (like "ڣ" and "漥"). Any idea why this is? Commented Jan 2, 2020 at 1:37