Howtoforge published a tutorial showing you how to use the xxd command.
Linux xxd Command Tutorial for Beginners (with Examples)
Need a hex dump for a text file? Looking for a command line utility that can do this? Well, you are in luck, as there exists a command dubbed xxd.
Linux xxd Command Tutorial for Beginners (with Examples)