HEXDUMP(3)
π HEXDUMP(3) π
okay so bestie, this page is from the Library Functions Manual, and it's about the libutil function that dumps a block of bytes to standard out in hexadecimal form. She's giving tiny forensic main character energy and honestly? obsessed. β¨
π NAME π
hexdump β dump a block of bytes to standard out in hexadecimal form
π¦ LIBRARY π¦
System Utilities Library β that's libutil, and you link it with -lutil. Slay.
πΈ SYNOPSIS πΈ
#include <libutil.h>
void
hexdump(void *ptr, int length, const char *hdr, int flags);
β¨ DESCRIPTION β¨
The hexdump() function prints an array of bytes to standard out in hexadecimal form, along with the ASCII representation of the bytes, if possible. Default vibe: each line of output starts with an offset count, then 16 hexadecimal values, then 16 ASCII characters. No cap, that's the layout. π
ptrβ pointer to the array of bytes to print. It does not need to be NUL-terminated. She can be raw like that, fr fr.lengthβ number of bytes to print. Literally just how many bytes we're serving.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. So if you passNULL, the header said "not me being absent" π.flagsβ flags for controlling the formatting of the output. Here's the breakdown, bestie:- 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. Bye offset column π.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
β SEE ALSO β
π HISTORY π
The hexdump() function first appeared in FreeBSD 6.4. She's a classic, iykyk.
π AUTHORS π
This manual page was written by Scott Long. Respect the icon who wrote the docs. π«Ά
And that's the tea: this page is from the Debian build, dated May 8, 2020 β periodt π β¨
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- 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