How to use xxd command In Linux
Syntax:
xxd [options] [file path]
Options available in xxd command
Here’s a table that summarizes some of the most common options of the “xxd” command and their descriptions:
Options | Description |
---|---|
-l | Limit the number of bytes processed or displayed. |
-g | Set the number of bytes per group in the output. |
-c | Set the number of bytes per line in the output. |
-s | Skip a specified number of bytes before processing. |
-b | Generate a binary digit dump |
-u | Generate includedincluded uppercase hex-dump |
-ps | Output in postscript continuous hex-dump style. |
-i | Generate a C-included left file with binary data as an array. |
-r | Reverse the process by converting a hexadecimal dump back into binary. |
-v | Display the version information of “xxd.” |
xxd Command in Linux
xxd is a command-line tool that is primarily used for creating and analyzing hexadecimal dumps from files. It can also be used to reverse the process and convert a hexadecimal dump back into binary form. In this article, let’s uncover the practical applications of the “xxd” command in the Linux ecosystem.
xxd Command in Linux
- What is a ‘hexadecimal dump’?
- Installing xxd on Linux
- Using xxd command:
- Generating hexadecimal dumps
- Converting hexadecimal dump to the original file
- Formatting output of xxd
- Different dump output styles
- Embedding Binary Data in C/C++ Code (xxd -i)