Od, hexdump, xxd --- hexadecimal viewing tool

Source: Internet
Author: User

Od, hexdump, xxd --- hexadecimal viewing tool

Name: od

Location:/usr/bin/od

Permission: All Users

Purpose: view non-plain text files, such as binary files

Usage: od [-t TYPE] File

-T can be followed by outputs of various types

A: Default reason characters are output.

C: output using ASCII characters

D [size]: output data in decimal format. Each integer occupies size bytes.

F [size]: outputs data using floating point numbers. Each integer occupies size bytes.

O [size]: Outputs Data Using octal. Each integer occupies size bytes.

X [size]: The hexadecimal format is used to output data. Each integer occupies size bytes.

For example:

# Od-t c/etc/issue
0000000 C e n t o s r e l e a s e 6
0000020. 7 (F I n a l) \ n K e r n e
0000040 l \ r o n a n \ m \ n
0000057

# Od-t d/etc/issue
0000000 1953391939 1914721103 1634036837 908092787
0000020 673199918 1634625862 1258957164 1701737061
0000040 1918640236 544108320 1545629281 658029
0000057

Hexdump testfile

For more information, see the help documentation.

 

Xxd

First open in binary mode:
Vim-B filename
In vim command mode, enter:
: %! Xxd # parameter % refers to the file currently edited

After editing, we need to restore it to a binary file:
: %! Xxd-r # parameter-r refers to converting the current hexadecimal format to binary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.