hbase

heirloom base
git clone git://git.2f30.org/hbase
Log | Files | Refs | README

hd.1 (3755B)


      1 .\"
      2 .\" Sccsid @(#)hd.1	1.8 (gritter) 12/5/04
      3 .TH HD 1XNX "12/5/04" "Heirloom Toolchest" "XENIX System Compatibility"
      4 .SH NAME
      5 hd \- (XENIX) display files in hexadecimal format
      6 .SH SYNOPSIS
      7 \fBhd\fR
      8 [\fB\-acbwlAxdov\fR]
      9 [\fB\-t\fR]
     10 [\fB\-s\fI\ offset\fR]
     11 [\fB\-n\fI\ count\fR]
     12 [\fIfiles\fR]
     13 .SH DESCRIPTION
     14 The
     15 .I hd
     16 command
     17 displays the contents
     18 of the given
     19 .I files
     20 (or of standard input
     21 if no such argument is present)
     22 in hexadecimal, decimal or octal format,
     23 16 bytes per line.
     24 It optionally displays printable ASCII characters in the rightmost column.
     25 The file address is printed in the leftmost column.
     26 .PP
     27 Output format selection is done
     28 with options; each format selection option consists
     29 (optionally) of a format selector and a base selector.
     30 .PP
     31 The format selectors are as follows;
     32 if no format selector is present,
     33 the base selector is applied to all available format selectors:
     34 .TP
     35 .B \-b
     36 Separates the input in bytes;
     37 each byte is printed as a numerical value.
     38 .TP
     39 .B \-c
     40 Separates the input in bytes;
     41 each byte that is also a printable character
     42 is printed as such,
     43 certain characters are printed as C language escapes,
     44 others as a numerical value.
     45 .TP
     46 .B \-w
     47 Separates the input in 16-bit words;
     48 each word is printed as a numerical value.
     49 .TP
     50 .B \-l
     51 Separates the input in 32-bit long words;
     52 each word is printed as a numerical value.
     53 .PP
     54 The following base selectors are accepted;
     55 if the base selector is omitted,
     56 all base selectors are applied to the chosen format selectors:
     57 .TP
     58 .B \-o
     59 Selects octal output.
     60 .TP
     61 .B \-d
     62 Selects unsigned decimal output.
     63 .TP
     64 .B \-x
     65 Selects hexadecimal output.
     66 .PP
     67 The format of the addresses at the left
     68 can also be selected by using the
     69 .TP
     70 .B \-a
     71 option followed by one of the base selectors;
     72 only one base selector is applied.
     73 The default address base is hexadecimal.
     74 .PP
     75 The following options also affect the output format:
     76 .TP
     77 .B \-A
     78 Causes bytes that are printable characters to be displayed
     79 as such at the right; nonprintable bytes are printed as `.'.
     80 .TP
     81 .B \-t
     82 Text file format; overrides all other format options except
     83 .IR \-a .
     84 Each line of the input is preceded by its address;
     85 printable characters are displayed as such,
     86 except for `\e', `^', and '~', which are prefixed by a `\e' character.
     87 ASCII control characters are prefixed by `^'.
     88 Bytes with the highest bit set that do not form a printable character
     89 are indicated by '~',
     90 followed by the corresponding ASCII character as above.
     91 .TP
     92 .B \-v
     93 Unless
     94 .I \-t
     95 is used,
     96 a set of immediately following indentical 16-byte sets
     97 is abbreviated by printing `*' for the second and further ones.
     98 This option inhibits this behavior
     99 and causes all lines to be displayed.
    100 This option is an extension.
    101 .PP
    102 If no output selection is present, the default is
    103 .IR \-bxA .
    104 .PP
    105 The following options affect the handling of input files:
    106 .TP
    107 \fB\-s\fI\ offset\fR
    108 Selects a starting offset within each file.
    109 .I Offset
    110 is interpreted as a decimal value
    111 unless prefixed by
    112 .BR 0 ,
    113 which causes interpretation as an octal value,
    114 or
    115 .BR 0x ,
    116 which causes interpretation as a hexadecimal value.
    117 The suffixes
    118 .BR w ,
    119 .BR l ,
    120 .BR b ,
    121 and
    122 .B k
    123 cause multiplication by
    124 2 (`words'),
    125 4 (`long words'),
    126 512 (`blocks'),
    127 or
    128 1024 (`kilobytes'),
    129 respectively.
    130 Value and suffix may be separated by a `*' character
    131 to suppress interpretation of `b' as a hexadecimal digit.
    132 .TP
    133 \fB\-n\fI\ count\fR
    134 Causes only
    135 .I count
    136 characters of the file to be displayed;
    137 .I count
    138 is handled as the
    139 .I offset
    140 for
    141 .I \-s
    142 described above.
    143 .SH "ENVIRONMENT VARIABLES"
    144 .TP
    145 .BR LANG ", " LC_ALL
    146 See
    147 .IR locale (7).
    148 .TP
    149 .B LC_CTYPE
    150 Selects the set of printable single-byte characters
    151 for the
    152 .I \-A
    153 and
    154 .I \-c
    155 options
    156 and the set of printable characters for the
    157 .I \-t
    158 option.
    159 .SH "SEE ALSO"
    160 od(1)