How to view files in binary from bash?
xxd
does both binary and hexadecimal.
bin:
xxd -b file
hex:
xxd file
hexdump -C yourfile.bin
unless you want to edit it of course. Most linux distros have hexdump
by default (but obviously not all).
vi your_filename
hit esc
Type :%!xxd
to view the hex strings, the n :%!xxd -r
to return to normal editing.