HEXDUMP(9)
π HEXDUMP(9) π
okay bestie, welcome to hexdump β the kernel developer's manual page that's about to make you obsessed with dumping bytes π
β¨ NAME β¨
hexdump β dump a block of bytes to the console in hexadecimal form π¦
πΈ SYNOPSIS πΈ
#include <sys/systm.h>
void
hexdump(void *ptr, int length, const char *hdr, int flags);
π DESCRIPTION π
so basically, the hexdump() function prints an array of bytes to the console in hexadecimal form, and it also throws in the ASCII representation of those bytes if it possibly can. like, it's giving β¨full serviceβ¨. By default, each line of output will start with an offset count, followed by 16 hexadecimal values, followed by 16 ASCII characters. it's a whole little lineup, no cap π₯
Now let's meet the parameters, they're all main characters:
ptrβ Pointer to the array of bytes to print. It does not need to be NUL-terminated, so don't stress about that πlengthβ Number of bytes to print.hdrβ Pointer to a NUL-terminated character string that will be prepended to each line of output. A value ofNULLimplies that no header will be printed. (soNULL= no header, she's just not showing up to the party π)flagsβ Flags for controlling the formatting of the output. this one has layers, iykyk π- Bits 0-7 β Integer value of the number of bytes to display on each line. A value of
0implies that the default value of16will be used. π - Bits 8-15 β Character ASCII value to use as the separator for the hexadecimal output. A value of
0implies that the default value of32(ASCII space) will be used. β¨ HD_OMIT_COUNTβ Do not print the offset column at the beginning of each line.HD_OMIT_HEXβ Do not print the hexadecimal values on each line.HD_OMIT_CHARSβ Do not print the character values on each line.
- Bits 0-7 β Integer value of the number of bytes to display on each line. A value of
bestie, note that those three HD_OMIT_* flags are your lil switches for turning off entire columns. use them wisely π«Ά
π SEE ALSO π
π AUTHORS π
This manual page was written by Scott Long. iconic behavior, honestly π
and that's the whole page, periodt π
this Debian version of the HEXDUMP(9) page from the Kernel Developer's Manual is dated December 7, 2003 β vintage but still slay β¨ππ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2003 Scott Long
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms