adam_0 adam_0 - 1 year ago 122
Linux Question

How to view files in binary in the terminal?

First things first, I'm on a Mac ssh'ing into a Linux machine via Terminal.

I would like to view the contents of a file in the current directory, but in binary. Is there a binary mode for any text editors like VI or Nano or the like?

Answer Source

xxd does both binary and hexadecimal


xxd -b file


xxd file
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download