ud 1 2013-12-14

NAME

ud - universal dump

SYNPOSIS

ud [ options ] [ flags ]

DESCRIPTION

ud displays data streams in binary, decimal, octal, hex and printable ASCII. By default it works in interactive ("real-time") mode when incoming bytes are displayed without delay while maintaining the tabular format, simple command line options to configure display format and displaying data in binary (8 bits, each 0 or 1).

Options are key-value pairs which can be described as "key=value" or "key value" on the command line. Key may be prefixed with arbitrary amount of dashes. The folowing examples are equivalent: --cols 1, --cols=1, -cols=1, cols=1, cols 1.

Furthermore all keys have a long and a short (single letter) name which are also interchangable. To follow the conventions, this manual will list the long key names with a double dash prefix and the short keys with a signle dash prefix.

Key-value options

--cols number-of-chars override terminal width; alias: -c
--data_cols number-of-bytes number of bytes to be displayed per line; alias: -d
--col_hdr_width number-of-chars width of the offset display column; alias: -H
--word_size size-of-a-word-in-bytes leave some gap after word_size bytes in each line of the table; this option is used to group data in two 8 bytes column on the default 16-bytes-in-a-line hex view (--word_size 8); alias: -w
--printable 0|1 When 1, display printable ASCII (column 3). alias: -p
--interactive 0|1 1 means terminal controls and real-time operation, 0 means script-processable output on stdout; alias: -i
--fmt format data display format (can not be "none"); alias: -f
--offs format first column offset display format (can be "none"); alias: -o
--skip num-bytes skip the first num-bytes bytes of input; alias: -s
--len num-bytes stop after printing num-bytes bytes of input; alias: -l
--output filename also dump lines, without temrinal control, to file named filename (overwriting the file if it existed); alias: -o
--append filename also dump lines, without temrinal control, to file named filename (append to the file if it exists); alias: -a

Key-only flags

--help display help screen and exit; alias: -h
--verbose increase verbosity level; alias: -v
--force don't think, just do what the user wants, even if it is contradictionary or doesn't seem to make any sense; alias: -f

Display formats

binary bin, binary, 2
octal oct, octal, 8
decimal dec, decimal, 10
hexadecimal, lower case (default) hex, hexl, hexadecimal, 16
hexadecimal, upper case HEX, HEXU, HEXADECIMAL
none (column turned off) none, -, off

EXAMPLE

1. Print data in binary, 4 bytes per line grouped in 2x2 bytes:

 GNU-style long options:
  ud --fmt 2 --data_cols 4 --word_size 2

 UNIX-style short options:
  ud -f 2 -d 4 -w 2

 key-value style:
  ud fmt=2 data_cols=4 word_size=2

2. Print data in octal, 8 bytes per line, only the octal numerics,
   no ASCII, no offset:

  ud fmt=octal data_cols=8 word_size=0 printable=0 offs=none

SEE ALSO

ud 1 2013-12-14