The Tech Edvocate

Top Menu

  • Advertisement
  • Apps
  • Home Page
  • Home Page Five (No Sidebar)
  • Home Page Four
  • Home Page Three
  • Home Page Two
  • Home Tech2
  • Icons [No Sidebar]
  • Left Sidbear Page
  • Lynch Educational Consulting
  • My Account
  • My Speaking Page
  • Newsletter Sign Up Confirmation
  • Newsletter Unsubscription
  • Our Brands
  • Page Example
  • Privacy Policy
  • Protected Content
  • Register
  • Request a Product Review
  • Shop
  • Shortcodes Examples
  • Signup
  • Start Here
    • Governance
    • Careers
    • Contact Us
  • Terms and Conditions
  • The Edvocate
  • The Tech Edvocate Product Guide
  • Topics
  • Write For Us
  • Advertise

Main Menu

  • Start Here
    • Our Brands
    • Governance
      • Lynch Educational Consulting, LLC.
      • Dr. Lynch’s Personal Website
      • Careers
    • Write For Us
    • The Tech Edvocate Product Guide
    • Contact Us
    • Books
    • Edupedia
    • Post a Job
    • The Edvocate Podcast
    • Terms and Conditions
    • Privacy Policy
  • Topics
    • Assistive Technology
    • Child Development Tech
    • Early Childhood & K-12 EdTech
    • EdTech Futures
    • EdTech News
    • EdTech Policy & Reform
    • EdTech Startups & Businesses
    • Higher Education EdTech
    • Online Learning & eLearning
    • Parent & Family Tech
    • Personalized Learning
    • Product Reviews
  • Advertise
  • Tech Edvocate Awards
  • The Edvocate
  • Pedagogue
  • School Ratings

logo

The Tech Edvocate

  • Start Here
    • Our Brands
    • Governance
      • Lynch Educational Consulting, LLC.
      • Dr. Lynch’s Personal Website
        • My Speaking Page
      • Careers
    • Write For Us
    • The Tech Edvocate Product Guide
    • Contact Us
    • Books
    • Edupedia
    • Post a Job
    • The Edvocate Podcast
    • Terms and Conditions
    • Privacy Policy
  • Topics
    • Assistive Technology
    • Child Development Tech
    • Early Childhood & K-12 EdTech
    • EdTech Futures
    • EdTech News
    • EdTech Policy & Reform
    • EdTech Startups & Businesses
    • Higher Education EdTech
    • Online Learning & eLearning
    • Parent & Family Tech
    • Personalized Learning
    • Product Reviews
  • Advertise
  • Tech Edvocate Awards
  • The Edvocate
  • Pedagogue
  • School Ratings
  • A Visitor’s Guide to Fresno (CA), United States

  • A Visitors Guide to New Orleans (LA), United States

  • A Visitors Guide to Sacramento (CA), United States

  • A Visitors Guide to Lyon, France

  • JisuLife Ultra2 Portable Fan: A Powerful Multi-Function Cooling Solution

  • A Visitors Guide to Viña del Mar, Chile

  • A Visitors Guide to Århus, Denmark

  • A Visitors Guide to Bakersfield (CA), United States

  • A Visitors Guide to Aurora (CO), United States

  • A Visitor’s Guide to Toledo (OH), United States

Digital & Mobile Technology
Home›Digital & Mobile Technology›How to Use the xxd Hex Dumper Utility in Linux

How to Use the xxd Hex Dumper Utility in Linux

By Matthew Lynch
June 21, 2023
0
Spread the love

The xxd utility is a command-line tool available in Linux that allows you to dump a binary file in hexadecimal, octal, decimal or binary format. It is especially useful for viewing and analyzing the contents of binary files such as executables and image formats. This article will provide you with a step by step guide on how to use the xxd hex dumper utility in Linux.

Step 1: Install xxd

The xxd tool is generally included in most Linux distributions. In case it is not installed in your system, you can install it using the following command:

`sudo apt-get install xxd`

Alternatively, you can use the package manager available on your Linux distribution to install it.

Step 2: Basic Usage

To use the xxd utility, navigate to the location of the binary file using the terminal, and then type the following command:

`xxd filename.bin`

This will display the contents of the binary file in hex format in the terminal.

Step 3: Additional Options

The xxd utility also supports several additional options to customize the way the output is displayed. Below are some of the most commonly used options:

– `-b` – displays the output in binary format
– `-c` – specifies the number of bytes to be displayed in a single line
– `-g` – specifies the number of bytes per group when displaying hex output
– `-l` – specifies the number of bytes to be displayed
– `-u` – displays the output using uppercase letters
– `-v` – displays the ASCII representation along with the hex output

For example, the following command will display the contents of the binary file using 8 bytes per line:

`xxd -c 8 filename.bin`

Step 4: Redirecting Output

You can also redirect the output of the xxd command to a text file using the standard output redirection operator `>`.

For example, to save the output of the xxd command to a file called `output.txt`, run the following command:

`xxd filename.bin > output.txt`

Step 5: Modifying Files with the xxd Utility

Besides just displaying the contents of a binary file, the xxd utility can also be used to make changes to the file.

To modify a binary file using the xxd utility, follow these steps:

– Dump the contents of the file into a new file
– Edit the new file using a hex editor
– Convert the edited file back to binary

For example, to modify a binary file `filename.bin` using the xxd utility, run the following commands:

1. Dump the contents of the file to a new file:
`xxd filename.bin > output.txt`

2. Open the new file in a hex editor and modify the necessary bytes.

3. Convert the modified file back to binary:
`xxd -r output.txt > newfilename.bin`

Conclusion

The xxd hex dumper utility is a powerful tool that allows you to analyze and modify binary files with ease. With the ability to customize output and redirect output to files, it makes analyzing binary files in Linux a breeze. Combine xxd with a hex editor and you have an efficient method to modify and analyze binary files.

Previous Article

Ways to Disappear From WhatsApp Without Deleting ...

Next Article

Apple Magsafe Case: There’s a Reason It ...

Matthew Lynch

Related articles More from author

  • Digital & Mobile Technology

    How to Flush the DNS Cache on Linux

    May 28, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    How to Turn Off Siri on AirPods

    May 29, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    WhatsApp vs. Skype

    July 31, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    How to Convert WAV to MP3 in Audacity

    June 9, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    Funny Photoshop Ideas You May Not Have Thought Of

    June 6, 2023
    By Matthew Lynch
  • Digital & Mobile Technology

    What Is Denon HEOS?

    June 8, 2023
    By Matthew Lynch

Search

Login & Registration

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Newsletter

Signup for The Tech Edvocate Newsletter and have the latest in EdTech news and opinion delivered to your email address!

About Us

Since technology is not going anywhere and does more good than harm, adapting is the best course of action. That is where The Tech Edvocate comes in. We plan to cover the PreK-12 and Higher Education EdTech sectors and provide our readers with the latest news and opinion on the subject. From time to time, I will invite other voices to weigh in on important issues in EdTech. We hope to provide a well-rounded, multi-faceted look at the past, present, the future of EdTech in the US and internationally.

We started this journey back in June 2016, and we plan to continue it for many more years to come. I hope that you will join us in this discussion of the past, present and future of EdTech and lend your own insight to the issues that are discussed.

Newsletter

Signup for The Tech Edvocate Newsletter and have the latest in EdTech news and opinion delivered to your email address!

Contact Us

The Tech Edvocate
910 Goddin Street
Richmond, VA 23231
(601) 630-5238
[email protected]

Copyright © 2025 Matthew Lynch. All rights reserved.