🌐
Namehero
namehero.com › blog › how-to-use-the-xxd-command-in-linux
How to Use the xxd Command in Linux
September 8, 2025 - For example, I have a script file on my server, and if I feed it into xxd as shown above, it looks like this: ... You can see that the command shows 16 bytes at a time, starting with the offset on the left-hand column. It then shows me the ASCII representation of those bytes in the right-hand column.
🌐
GeeksforGeeks
geeksforgeeks.org › linux-unix › xxd-command-in-linux
xxd Command in Linux - GeeksforGeeks
February 13, 2026 - The xxd command allows you to specify an offset, effectively skipping a certain number of lines or bytes in the input file when generating a hexadecimal dump.
Discussions

Help need to decipher this command: xxd
Greetings, I have used xxd along with the same parameters to pipe binary characters to a binary file. The reason you are seeing ascii characters is because all the command with those parameters displays the result in ascii and all of your characters from the binary conversion result in regular ascii characters. I found this from a quick search to confirm: https://www.scadacore.com/tools/programming-calculators/online-hex-converter/ If you try this one from terminal you will see it outputs special characters because it cannot display them from a terminal. echo 0ee221ef9e00dfa69efb3b1112bfbb2f | xxd -r -p The sample I listed is part of this script (I'm the author) and used with file encryption. Basically it converts hex to binary and appends the binary bytes to a binary file. Near the bottom of the document I list step by step example of encryption and how to use the commands. For this script xxd is critical because it's the only way to convert to and from hex from shell without installing additional tools. https://fastsitephp.com/en/documents/file-encryption-bash # Append IV to the end of the file. # Typically in secure applications and sites the IV is saved with the # encrypted data while only the key is required to be secret. echo 0ee221ef9e00dfa69efb3b1112bfbb2f | xxd -r -p >> crypto_test_10mb.enc # Now view the end of the file after adding IV tail -c 32 crypto_test_10mb.enc | hexdump -C -v More on reddit.com
🌐 r/bash
13
11
March 25, 2022
xxd for macOS?
/usr/bin/xxd is part of macOS (up to and including 12.6). Current version: xxd 2022-01-14 by Juergen Weigert et al.. Not necessary to install anything, really. And not simple to delete as well. Have you checked your /usr/bin? Have you checked your PATH environment? What does command -v xxd say? What happens when you execute /usr/bin/xxd? More on reddit.com
🌐 r/commandline
10
14
October 3, 2022
Why hexdump and xxd give a little different output?
One is little-endian and the other is big-endian. Check their respective man pages. I'm sure there's a switch to switch endedness. More on reddit.com
🌐 r/linuxquestions
6
2
December 23, 2020
Why does doing xxd from hexdump info to binary put 0000 0000 at the start of output binary?
What is those extra 0000 0000 at the start You've asked for the leading address to be decoded as data using -p how can I do xxd -r -p without those? You can do it like this: cut -d: -f 2 < input.txt | xxd -r -p > output.tar.gz (You can also just drop the -p, but Reddit really hates on the stackoverflow type answers where they say "don't do that, do this instead") More on reddit.com
🌐 r/linuxquestions
2
0
December 24, 2020
🌐
Linux TLDR
linuxtldr.com › home › how to use xxd command in linux: a step-by-step guide
How to Use XXD Command in Linux: A Step-by-Step Guide
September 30, 2024 - However, if you are unable to locate it and are getting an “xxd: command not found” error, then open your terminal and execute the following command to install it: # On Debian, Ubuntu, Mint, Pop!_OS, etc. $ sudo apt install xxd · # On Redhat, ...
🌐
OnWorks
onworks.net › home
xxd
-r skips everything on the input line after reading enough columns of hexadecimal data (see option -c). This also means, that changes to the printable ascii (or ebcdic) columns are always ignored. Reverting a plain (or postscript) style hexdump with xxd -r -p does not depend on the correct ...
🌐
Linux Handbook
linuxhandbook.com › xxd-command
Use XXD Command in Linux
June 3, 2024 - Like any other normal command, it takes data from the standard input or file and gives hexadecimal output. It can also do the opposite and convert hex to normal characters. And in this tutorial, I will walk you through different examples of how to use the xxd command in Linux.
🌐
Command Not Found
command-not-found.com › xxd
command-not-found.com – xxd
apt-get install xxd · CentOS · yum install xxd · Fedora · dnf install vim-common-2 · Windows (WSL2) sudo apt-get update sudo apt-get install xxd · Raspbian · apt-get install xxd · Dockerfile · dockerfile.run/xxd · Generate a hexdump ...
🌐
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.
🌐
Unix.com
unix.com › man_page › centos › 1 › xxd
xxd(1) centos man page | unix.com
Man page for xxd(1) on centos, from the unix.com online archive.
Find elsewhere
🌐
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 ...
🌐
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...
🌐
TutorialsPoint
tutorialspoint.com › unix_commands › xxd.htm
xxd - Unix, Linux Command
Python TechnologiesDatabasesComputer ... MarketingSoftware QualityManagement Tutorials View All Categories ... xxd creates a hex dump of a given file or standard input....
🌐
Webilicious
webilicious.xyz › home › linux › linux xxd command tutorial for newbies (with examples)
Linux xxd Command Tutorial for Newbies (with Examples) - Webilicious
November 20, 2018 - Every line is preceded by a line quantity in hexadecimal and adopted by an ascii (or ebcdic) illustration. The command line switches -r, -p, -i don't work with this mode. ... So you’ll be able to see, the xxd command is helpful in case you deal in hex and binary file contents.
🌐
LinuxOPsys
linuxopsys.com › xxd-command-in-linux-with-examples
xxd Command in Linux with Examples
December 18, 2023 - The xxd command is a hex dumper. This means it takes a standard input or a file and then converts it to hexadecimal. It can also convert hex dump back to binary form.
🌐
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.
🌐
idroot
idroot.us › home › xxd command in linux with examples
Xxd Command in Linux with Examples - idroot
March 29, 2025 - If xxd is already installed as part of vim-common, this command will simply confirm the installation. For Red Hat Enterprise Linux, Fedora, CentOS, and AlmaLinux, use the dnf package manager:
🌐
Computer Hope
computerhope.com › unix › xxd.htm
Linux Xxd Command
June 1, 2025 - The first command specifies the length in decimal (20), the second specifies the length in hexadecimal (0x14), and the third specifies the length in octal (024). Below shows this in use on a two paragraph lorem ipsum file saved as UTF-8 (8 bits per character). ch@computerhope ~ : xxd -s -20 lorem.txt 00000583: 2c20 6772 6176 6964 6120 6567 6574 206f , gravida eget o 00000593: 7263 692e rci.
🌐
Linux Man Pages
linux.die.net › man › 1 › xxd
xxd(1): make hexdump/do reverse - Linux man page
Rewind stdin before reading; needed because the 'cat' has already read to the end of stdin. % sh -c "cat > plain_copy; xxd -s 0 > hex_copy" < file
🌐
X-CMD
x-cmd.com › install › xxd
View Binary and Patch Back? xxd Hex Dump and -r Reverse to Binary | via X-CMD | xxd
Quick terminal hex view and reverse to binary? As a light alternative to hexdump, xxd does both directions and pipes. Install via X-CMD for scripting and protocol inspection.
🌐
OnWorks
onworks.net › home › os distributions › programs › xxd online
xxd - Online in the Cloud
-r skips everything on the input line after reading enough columns of hexadecimal data (see option -c). This also means, that changes to the printable ascii (or ebcdic) columns are always ignored. Reverting a plain (or postscript) style hexdump with xxd -r -p does not depend on the correct ...