hexdump - reversible hexdump
] [ -f
] [ [ -i
] [ -w #
is the standard utility for viewing binary files.
Together with hex2bin, hexdump
is also a utility for editing binary
files. First you hexdump
the file, then you modify the dump-file in an
editor, then you use hex2bin to produce the modified binary file.
- causes hexdump to display all input data. Without this option, any number
of output lines that are identical to the immediately preceding output
line (except for the input offset), are replaced with a line comprised of
a single asterisk. This makes output more concise e.g. if input contains a
long sequence of one repeated byte value.
- -w #
- specifies the number of hex-dumped bytes per output line. Minimum is 1,
maximum is 10240 but can be changed in the source. Default is 16.
- (flush-mode) causes hexdump to reflect its input immediately. Without this
option, output is buffered (on ttys this means linebuffered, otherwise
even blockbuffered). This option is especially useful, if you want to
watch bytes as they are trickling out of a binary device. (e.g.
For obvious reasons, this implies -v.
- [-i] inputfile
- at most one inputfile can be given. if none is, then stdin will be used
for input. (Giving more Inputfiles would have no sense.) On systems where
textfiles and binaries are treated differently (such as MS-DOS) an
inputFile should be given, as input-redirection may be flakey with binary
- -o outputfile
- at most one outputfile can be given. if none is, then stdout will be used
Copyright (c) 2001 by Andreas Leitgeb (AvL)
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted, provided that
the above copyright notice appear in all copies and that both that copyright
notice and this permission notice appear in supporting documentation.