SYNOPSIS

       hd [-acbwlAxdov] [-t] [-s offset] [-n count] [files]


DESCRIPTION

       The hd command displays the contents of the given files (or of standard
       input if no such argument is present) in hexadecimal, decimal or  octal
       format,  16  bytes  per  line.   It optionally displays printable ASCII
       characters in the rightmost column.  The file address is printed in the
       leftmost column.

       Output  format  selection  is  done with options; each format selection
       option consists (optionally) of a format selector and a base  selector.

       The  format selectors are as follows; if no format selector is present,
       the base selector is applied to all available format selectors:

       -b     Separates the input in bytes; each byte is printed as a  numeri-
              cal value.

       -c     Separates the input in bytes; each byte that is also a printable
              character is printed as such, certain characters are printed  as
              C language escapes, others as a numerical value.

       -w     Separates  the  input in 16-bit words; each word is printed as a
              numerical value.

       -l     Separates the input in 32-bit long words; each word  is  printed
              as a numerical value.

       The  following  base  selectors  are  accepted; if the base selector is
       omitted, all base selectors are applied to the chosen format selectors:

       -o     Selects octal output.

       -d     Selects unsigned decimal output.

       -x     Selects hexadecimal output.

       The  format  of the addresses at the left can also be selected by using
       the

       -a     option followed by one of the  base  selectors;  only  one  base
              selector is applied.  The default address base is hexadecimal.

       The following options also affect the output format:

       -A     Causes  bytes  that  are printable characters to be displayed as
              such at the right; nonprintable bytes are printed as `.'.

       -t     Text file format; overrides all other format options except  -a.
              Each  line  of  the  input is preceded by its address; printable
              characters are displayed as such, except for `\', `^', and  '~',

       -s offset
              Selects  a  starting  offset within each file.  Offset is inter-
              preted as a decimal value unless prefixed  by  0,  which  causes
              interpretation  as an octal value, or 0x, which causes interpre-
              tation as a hexadecimal value.  The suffixes  w,  l,  b,  and  k
              cause  multiplication  by  2  (`words'),  4  (`long words'), 512
              (`blocks'), or 1024 (`kilobytes'), respectively.  Value and suf-
              fix  may be separated by a `*' character to suppress interpreta-
              tion of `b' as a hexadecimal digit.

       -n count
              Causes only count characters of the file to be displayed;  count
              is handled as the offset for -s described above.


ENVIRONMENT VARIABLES

       LANG, LC_ALL
              See locale(7).

       LC_CTYPE
              Selects  the  set of printable single-byte characters for the -A
              and -c options and the set of printable characters  for  the  -t
              option.


SEE ALSO

       od(1)



Heirloom Toolchest                  12/5/04                           HD(1XNX)

Man(1) output converted with man2html