Sigrid Solveig Haflínudóttiradd -p ("pipe") optionea234b63 years agoHistory
25 lines · 748 B · Markdown
RawDownload

hx

A faster version of hexdump -C that I constantly use.

Comparison on a 1.8Gb file, time <command> >/dev/null:

hexdump -C file hx file
real 3m56.715s real 0m6.111s
user 3m55.839s user 0m5.235s
sus 0m0.847s sys 0m0.489s

Around 40 times faster, eh?

Building/installing

Plan 9: clone the repo, do mk install.

UNIX-like operating systems: gcc -Wall -Wextra -O2 -s -g0 hx.c -o hx

Notes

  • hx will print data as soon as it is available (if used on pipes), without buffering
  • option -s ("section") to print data read immediately, separating it into sections
  • option -p ("pipe") to print hex on stderr and pipe incoming data as is on stdout

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t