How to print a binary file in hexadecimal format of all content? Use xxd:xxd file.txt orxxd -p file.txt Related posts:Python: printing integers in hexadecimal format How to sort a file by hexadecimal numbers on Linux using sort command? Printing “powernow-k8 transition frequency failed” after install XEN How to resume a printing job on HP printer if the paper runs out on Linux? How to read the whole file content into a string in Go? How to write file content with sudo in Vim? Printing a Line to STDERR and STDOUT in Python How to get a FILE pointer from a file descriptor and how to get a file descriptor from a FILE pointer in C on Linux?