Name

dumpfile — Displays a file in a hexadecimal dump

Synopsis

dumpfile {filename} [-s, --start {offset}] [-l, --length {length}] [-b, --blksize {size}] [-t, --text] [--help]

Options

filename

File to dump

-s, --start offset

Offset, in bytes, into the file to start the dump

-l, --length length

Length of data, in bytes, to dump

-b, --blksize size

Block size

-t, --text

Dump text only, no hex output

--help

Display short helptext and exit

Description

Use to display the contents of a file in a hexadecimal dump. The output will be put through a pager and can be aborted with q.

Care should be taken with the parameters to this command which come after the filename.

Example 13.2. Using the dumpfile command

This example shows the dumpfile command being used in text only mode to show the first 300 bytes of a file.

>dumpfile (hd0)/etc/services -t -l 300
dump: (hd0)/etc/services is 17571 bytes long, dumping 0 to 300
00000000: # Network services, Internet style.#.# Note that it is presently
00000040:  the policy of IANA to assign a single well-known.# port number
00000080: for both TCP and UDP; hence, officially ports have two entries.#
000000c0:  even if the protocol doesn't support UDP operations..#.# Update
00000100: d from http://www.iana.org/assignments/port-numbers and other.#
>

This shows the file dump of the same file with hex output and starting with a hundred byte offset into the file.

>dumpfile (hd0)/etc/services -s 100
dump: (hd0)/etc/services is 17571 bytes long, dumping 100 to 17571
00000064: 7720656c 2d6c6c65 776f6e6b 20230a6e : le well-known.#
00000074: 74726f70 6d756e20 20726562 20726f66 : port number for
00000084: 68746f62 50435420 646e6120 50445520 : both TCP and UDP
00000094: 6568203b 2c65636e 66666f20 61696369 : ; hence, officia
000000a4: 20796c6c 74726f70 61682073 74206576 : lly ports have t
000000b4: 65206f77 6972746e 230a7365 65766520 : wo entries.# eve
000000c4: 6669206e 65687420 6f727020 6f636f74 : n if the protoco
000000d4: 6f64206c 276e7365 75732074 726f7070 : l doesn't suppor
000000e4: 44552074 706f2050 74617265 736e6f69 : t UDP operations
000000f4: 0a230a2e 70552023 65746164 72662064 : ..#.# Updated fr
00000104: 68206d6f 3a707474 77772f2f 61692e77 : om http://www.ia
00000114: 6f2e616e 612f6772 67697373 6e656d6e : na.org/assignmen
00000124: 702f7374 2d74726f 626d756e 20737265 : ts/port-numbers
00000134: 20646e61 6568746f 20230a72 72756f73 : and other.# sour
00000144: 20736563 656b696c 74746820 2f2f3a70 : ces like http://
00000154: 2e777777 65657266 2e647362 2f67726f : www.freebsd.org/
00000164: 2f696763 77737663 632e6265 732f6967 : cgi/cvsweb.cgi/s
00000174: 652f6372 732f6374 69767265 20736563 : rc/etc/services
00000184: 20230a2e 2077654e 74726f70 69772073 : ..# New ports wi
00000194: 62206c6c 64612065 20646564 72206e6f : ll be added on r
--MORE--
>

See also

cat.