HEXDUMP(9)
π NAME
okay so bestie, this is HEXDUMP(9) β the kernel developer manual page for hexdump, and its whole thing is dumping a block of bytes to the console in hexadecimal form. β¨ literally the glow-up inspector for raw bytes.
β¨ SYNOPSIS
#include <sys/systm.h>
void
hexdump(void *ptr, int length, const char *hdr, int flags);
π DESCRIPTION
The hexdump() function prints an array of bytes to the console in hexadecimal form, along with the ASCII representation of those bytes, if possible. no cap, it's giving βshow me the vibes of this memory.β πΈ
By default, each line of output starts with an offset count, followed by 16 hexadecimal values, followed by 16 ASCII characters. iconic formatting behavior, honestly. π«Ά
ptrβ pointer to the array of bytes to print. it does not need to be NUL-terminated, bestie. it's just bytes. raw. unfiltered. πlengthβ number of bytes to print.hdrβ pointer to a NUL-terminated character string that gets prepended to each line of output. a value ofNULLimplies that no header will be printed. so if you want no header energy,NULLis your girl. πflagsβ flags for controlling the formatting of the output. this is where it gets cute and specific:- 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. so0doesn't mean zero bytes, it means βbestie, use the default.β π - 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. yes, that's the space character. slay.π₯ 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
lowkey important: these are flags, not suggestions. the kernel is gonna format exactly what you ask for. π
π SEE ALSO
π AUTHORS
This manual page was written by Scott Long. periodt. π
okay bye bestie β this one's from the Debian manual, dated December 7, 2003, and it was HEXDUMP(9) the whole time π«Άπ
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2003 Scott Long
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms