PIXD(1)
π NAME
okay so pixd β literally a colourful binary file visualizer. This is the pixd(1) page from the General Commands Manual, and bestie, itβs giving terminal rainbows π
π.
β¨ SYNOPSIS β¨
pixd [-r range] [-w width] [file ...]
π¦ DESCRIPTION π¦
pixd visualizes binary data by mapping each octet to a colour according to a palette, and it displays the octet at a given number of columns per line. Itβll process the files specified as arguments, or standard input if none are provided. No cap. π
Heads up, bestie: pixd uses 24-bit colour SGR sequences and the U+2580 UPPER HALF BLOCK glyph for rendering. This means your terminal emulator needs to support both Unicode and 24-bit colour sequences β thatβs the vibe check π
.
The default palette maps the high nibble into a hue and the low nibble into a brightness value. The hues used are:
- black (
0x00) - red-orange (
0x01..0x1F) - yellow (
0x20..0x3F) - green (
0x40..0x7F) - cyan-blue (
0x80..0xBF) - purple-pink (
0xC0..0xFE) - white (
0xFF)
π OPTIONS π
If no file operands are specified, standard input is read instead. Available options are listed below.
-r rangeβ range of octets to print from each file. You write it as eitherstart-endorstart+count, wherestartandend/countare positive integers specified in decimal, hexadecimal, or octal (C-style notation). With thestart-endsyntax, both ends of the range are optional and default to the start or end of the file when omitted.-w widthβ number of octets per line, separated into groups (see-g). Set to64by default.
π§ ENVIRONMENT π§
PIXD_COLORS can be used to override the colour palette. If set, it should consist of 256 whitespace-separated hex colours; each colour has to be exactly 6 hexadecimal digits representing a 24-bit colour (e.g. FFFF00 for yellow). So yeah, count those digits, bestie π.
π EXAMPLES π
Here are some examples of useful uses of hexdβs features (iykyk).
pixd -r0x1000+0x200 foo.bin
pixd -r0x1000+0x200 foo.bin
Display the 512-byte range in foo.bin starting at offset 0x1000. Useful when files contain other embedded files/formats at a certain location (e.g. archive files). Iconic for peeking inside stuff π₯.
pixd -r-0x400 *.bin
pixd -r-0x400 *.bin
Show the first 1024 bytes of each of the *.bin files, with a heading above each file (if more than one). This is useful for example to compare headers of several samples of an unknown format. Obsessed with a good header comparison π«Ά.
curl -s http://example.com | pixd | less -R
curl -s http://example.com | pixd | less -R
pixd works as a filter, too. For paging, less(1)βs -R flag is useful. Filter queen behavior π.
π SEE ALSO π
π AUTHORS π
Written by Jonas βFireFlyβ HΓΆglund. Periodt. π
π«Ά and thatβs the whole PIXD(1) page β source/version vibes: Debian, dated May 25, 2017. bye bestie, go make some binary rainbows ππ
π¦ where this page comes from
- nixos 26.05: pixd 1.0.0
- nixpkgs unstable: pixd 1.0.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms