Skip to content

x1f43/hexdump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

hexdump

A lightweight command-line utility to display the contents of a file (or standard input) in hexadecimal format.


Usage

bash:

hexdump [FILE]

If no file is provided, hexdump reads from standard input.


Options

Short Long Description
-G --VT100 Use VT100 line drawing characters.
-r --row Number of bytes per line (default: 16).
--help Display usage help and exit.
--version Show version information and exit.

Examples

Display a file in hex

hexdump myfile.bin

Read from standard input

echo "Hello" | hexdump

Show 9 bytes per line with VT100 borders

hexdump -r9 -G myfile.bin


Sample Output

Example using hexdump -r9 -G:

00065355 00 00 00 00 │ 02 2c e7 ef │ 0a .....,...
0006535e 00 00 00 00 │ 00 09 a6 cf │ 0a .........
00065367 00 00 00 00 │ 00 ef f8 4f │ 0a .......O.
00065370 00 00 00 00 │ 03 36 10 80 │ 0a .....6...
00065379 00 00 00 00 │ 00 a2 c6 e0 │ 0a .........
00065382 00 00 00 00 │ 00 72 45 bf │ 0a .....rE..
0006538b 00 00 00 00 │ 02 cd 22 f0 │ 0a ......."..
00065394 00 00 00 00 │ 01 93 b0 a0 │ 0a .........
0006539d 00 00 00 00 │ 04 1b 3d 10 │ 0a ......=..
000653a6 00 00 00 00 │ 03 59 e8 ef │ 0a .....Y...

(Note: Line-drawing characters render correctly only in VT100-capable terminals.)


Notes

Works with any file or standard input stream.

Offset reading is supported only on block devices.

VT100 mode improves readability with simple table borders when supported by the terminal.

About

Small hexdump utility.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages