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?
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?
"hexdump -C yourfile.bin" perhaps, unless you want to edit it of course. Most linux distros have hexdump by default (but obviously not all).
vi yourfilename
hit escape
enter ":%!xxd" (minus quotes)
“:%!xxd -r“ will return to normal editing.