🌐
GeeksforGeeks
geeksforgeeks.org β€Ί linux-unix β€Ί xxd-command-in-linux
xxd Command in Linux - GeeksforGeeks
February 13, 2026 - The xxd command is a command-line utility used to create and analyze hexadecimal dumps of files.
🌐
X-CMD
x-cmd.com β€Ί install β€Ί xxd
View Binary and Patch Back? xxd Hex Dump and -r Reverse to Binary | via X-CMD | xxd
Use xxd -l 16 file to view the first 16 bytes β€” the magic number is right there. More raw than the file command, useful when file mis-identifies or you want to verify an unknown format.
People also ask

What is xxd?
xxd originated as a sub-component of Vim, later extracted as a standalone hex manipulation tool. It does two things β€” converting binary to readable hex text and converting hex text back to binary. The bidirectional capability makes it especially useful for scripting, binary patching, and data transmission.
🌐
x-cmd.com
x-cmd.com β€Ί install β€Ί xxd
View Binary and Patch Back? xxd Hex Dump and -r Reverse to Binary ...
How does ckormanyos/xxd differ from Vim's bundled xxd?
ckormanyos/xxd is an independently maintained version with: standalone build (MSVC solution and CMake, easier to compile on Windows); code compatible with C99/C11/C17/C23, compilable with GCC/Clang/MSVC; complete CI and test coverage; bug fixes such as Windows newline handling (LF getting an extra CR).
🌐
x-cmd.com
x-cmd.com β€Ί install β€Ί xxd
View Binary and Patch Back? xxd Hex Dump and -r Reverse to Binary ...
Is xxd already installed on my system?
Most Linux distributions and macOS ship vim with xxd included β€” try `xxd --help` to confirm. Windows usually does not include xxd; use ckormanyos/xxd pre-built releases or install via a package manager.
🌐
x-cmd.com
x-cmd.com β€Ί install β€Ί xxd
View Binary and Patch Back? xxd Hex Dump and -r Reverse to Binary ...
🌐
Linux Man Pages
linux.die.net β€Ί man β€Ί 1 β€Ί xxd
xxd(1): make hexdump/do reverse - Linux man page
xxd creates a hex dump of a given file or standard input. It can also convert a hex dump back to its original binary form. Like uuencode(1) and uudecode(1) it allows the transmission of binary data in a 'mail-safe' ASCII representation, but has the advantage of decoding to standard output.
🌐
Certbolt
certbolt.com β€Ί home β€Ί the xxd command explained: a must-have for linux system administrators
The XXD Command Explained: A Must-Have for Linux System Administrators - Certbolt | IT Certification News
May 13, 2026 - Running xxd in its simplest form requires nothing more than typing the command followed by the name of the file you want to inspect. The output appears in the terminal in three columns: the offset on the left, the hexadecimal representation of the data in the middle, and the ASCII text equivalent ...
🌐
Reddit
reddit.com β€Ί r/c_programming β€Ί how xxd command prints colored stuff?
r/C_Programming on Reddit: how xxd command prints colored stuff?
March 22, 2026 -

When I want to color my program's output, I just use color escape such as printf("\033[1;93m Colored Stuff\n"). But, when I pipe my program (colored) output to a text file, the escape sequence is visible. For example:

suppose I have a program called hello that calls printf("\033[1;93mHELLO WORLD!\n"), and I do:

hello > output.bin

the actual output is "\033[1;93mHELLO WORLD!" instead of "HELLO WORLD!".

but when I do:

xxd my_bin_file.bin > output.txt

the output.txt file contains all content, except color escapes.

I looked at the xxd source code but I didn't find anything about it.

And yes, all this stuff for print colored stuff lol.

🌐
Dustin John Pfister
dustinpfister.github.io β€Ί 2021 β€Ί 11 β€Ί 19 β€Ί linux-xxd
The Linux xxd command for dumping hex to the standard output rather than text | Dustin John Pfister at github pages
November 19, 2021 - So then great the Linux xxd command can be used to generate hex from a text source that is piped into it from another command. However it is also possible to read and create files with xxd alone, as well as do something like with this example ...
🌐
O'Reilly
oreilly.com β€Ί library β€Ί view β€Ί linux-pocket-guide β€Ί 9780596806347 β€Ί re28.html
xxd [options] [files] - Linux Pocket Guide [Book]
February 18, 2004 - Namexxd [options] [files] β€” vim-commonSynopsis/usr/bin stdin stdout - file -- opt --help --versionSimilar to od, xxd produces a hexadecimal or binary dump of a file in several... - Selection from Linux Pocket Guide [Book]
Author: Daniel J. Barrett
Published: 2004
Pages: 200
Find elsewhere
🌐
Analytics Vidhya
analyticsvidhya.com β€Ί home β€Ί understanding the xxd command in linux
Understanding the xxd Command in Linux
June 26, 2024 - This command starts the hex dump at offset 0x100 (256 in decimal). ... The xxd command is a robust and flexible tool for anyone needing to examine or modify binary file contents on a Linux system.
🌐
Debian Manpages
manpages.debian.org β€Ί bookworm β€Ί xxd β€Ί xxd.1.en.html
xxd(1) β€” xxd β€” Debian bookworm β€” Debian Manpages
Reverse operation: convert (or patch) hexdump into binary. If not writing to stdout, xxd writes into its output file without truncating it. Use the combination -r -p to read plain hexadecimal dumps without line number information and without a particular column layout.
🌐
Medium
medium.com β€Ί @tk512 β€Ί xxd-command-line-hex-wizardry-f0b0b4106624
XXD β€” Command line hex wizardry
January 20, 2016 - Due to the little-endian nature of the computer I am using, it’ll be stored as 3930, so let’s do a dirty command to find the offset. $ xxd -a -g 0 ./test | grep 3930 0000f30: 7dfc488975f0c745ec393000008b75ec }.H.u..E.90…u.
🌐
Network World
networkworld.com β€Ί home β€Ί blogs β€Ί unix as a second language
Using Linux hexedit and xxd commands to view and modify binary files | Network World
February 27, 2025 - The hexedit command provides a way to edit binary files, but to view and save the content in a file for later analysis without editing, try the xxd command.
🌐
Linux Command Library
linuxcommandlibrary.com β€Ί man β€Ί xxd
xxd man | Linux Command Library
xxd creates a hexadecimal dump of a file or standard input. The output shows the offset, hexadecimal values, and ASCII representation of the data. It can also reverse a hex dump back to the original binary.The default output format shows 16 ...
🌐
Linux Today
linuxtoday.com β€Ί home β€Ί infrastructure
Linux xxd Command Tutorial for Beginners (with Examples) | Linux Today
June 21, 2021 - Need a hex dump for a text file? Looking for a command line utility that can do this? Well, you are in luck, as there exists a command dubbed xxd that can do this for you.
🌐
TutorialsPoint
tutorialspoint.com β€Ί unix_commands β€Ί xxd.htm
xxd - Unix, Linux Command
Hexdump from file position 0x100 ( = 1024-768) on. % sh -c "dd of=plain_snippet bs=1k count=1; xxd -s +-768 > hex_snippet" < file
🌐
HowtoForge
howtoforge.com β€Ί home β€Ί linux xxd command tutorial for beginners (with examples)
Linux xxd Command Tutorial for Beginners (with Examples)
Each line is preceded by a line number in hexadecimal and followed by an ascii (or ebcdic) representation. The command line switches -r, -p, -i do not work with this mode. ... As you can see, the xxd command is useful if you deal in hex and binary file contents.
🌐
Quora
quora.com β€Ί What-is-the-xxd-command-in-Linux
What is the xxd command in Linux? - Quora
Answer (1 of 3): xxd is for making a hex dump of a given file. xxd -options infile outfile options are: -a toggle autoskip: A single '*' replaces nul-lines. Default off. -b binary digit dump (incompatible with -ps,-i,-r). Default hex. -c cols format octets per line. Default 16 (-i: 12...
🌐
Arch Linux Man Pages
man.archlinux.org β€Ί man β€Ί xxd.1.en
xxd(1) β€” Arch manual pages
Reverse operation: convert (or patch) hex dump into binary. If not writing to stdout, xxd writes into its output file without truncating it. Use the combination -r -p to read plain hexadecimal dumps without line number information and without a particular column layout.
🌐
LinuxConfig
linuxconfig.org β€Ί home β€Ί linux xxd command explained
Using xxd Command in Linux: Installation & Guide
September 22, 2025 - In this tutorial, we saw how to install and use the xxd command on a Linux system. xxd is a command line program that creates a hexadecimal dump of a binary file. This allows us to glean information that would otherwise be obscured, and also ...