NAME hd -- display a file in hexadecimal and ASCII SYNOPSIS hd [ options ] [ file ... ] DESCRIPTION hd is similar to od(1) (dump files to stdout in various formats), but emulates the (very) old IBM "dump" command for output, namely: address bytes-in-hex bytes-in-ASCII Like the POSIX version of od(1), hd has more options than one might expect; fortunately, in most cases, the default output is all that is needed. If no files are given on the command line, or if a dash ("-") is given as a filename, hd will read from stdin. If mutiple file names are given, there will be no delimiter between the files (in the output) but the addresses will start at zero for each file. BASIC OPTIONS -b treat blanks as printing characters (implies -d) -d print delimiters around the ASCII column -u use upper-case hex characters -v do not supress consecutive, identical lines --help --man this man page EXTENDED OPTIONS -A a[:] set the address width to "a" digits (default is 8); to suppress the address column, use "-A 0"; to add a colon (":") after the address, use "-A :" or "-A a:" -B B[.b] show blocks of "B" bytes together, with extra space between blocks (no default); if ".b" is given, put "b" spaces between groups (default is 3 spaces) -C c show non-printing characters as "c" (default is ".") -D c | cc set the delimiter on either side of the column of ASCII bytes to be the character specified by "c"; if two characters are given, the first character will be used on the left of thecolumn, the second character on the right; implied the "-d" flag (above) -G G[.g] show "G" bytes contiguously (default is 1); if ".g" is given, put "g" spaces between groups of bytes (default is 1 space) -L L set the "gutter" between the address column and the first hex byte (per line) to be "L" spaces wide (default is 2 spaces) -N N show "N" bytes per line (default is 16 bytes) -R R set the "gutter" between the last hex byte (per line) and the first ASCII byte (again, per line) to be "R" spaces wide (default is 2 spaces) CAVEATS The options "-B" and "-g", if used together, can produce unexpected results; it may help to remember that both options specify numbers of bytes, so if used together, the argument to "-G" should probably be larger than and a multiple of the argument given to "-B". Also, either option by itself will change the length of the output line, possibly making it wider than desired. EXIT STATUS hd exits with 0 on success, 1 on any error (including bad options). SEE ALSO od(1) AUTHOR Adam Moskowitz