Skip to main content
2 of 4
edited tags
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k

What is produced after using cat on an image?

I've been messing around with a virtualized version of natty on my iMac, and I'm a total n00b. I'd just like to preface this question with that, just in case anyone is wondering.

Let's say one creates a file like so:

touch myFile 

You enter some text in it with vim or whatever, and then use cat myFile to spit the contents out into the terminal.

Now, what happens when I use cat on any image? Say,

cat myPNG.png 

I just get a bunch of garbage. It just made me think about what the cat command is attempting to do. And where all of this "garbage" comes from. Just curious.

Thanks!

Qcom
  • 213
  • 2
  • 5