xxd not found in Recovery Mode, Mac OS X 10+
The recovery partition neither contains xxd nor od. Use the one installed to the main OS X volume by entering:

/Volumes/NameOfMainVolume/usr/bin/xxd


Don't forget to escape spaces in the name of your main OS X volume with a backslash. If you want to save something to a file also use your main volume. The Base OS X you are booted to is read-only and all the smaller r/w disks with less than ~50 MB are lost after a restart because they are in RAM.