Linux OD command: Display files in different binary

Source: Internet
Author: User

Introduced:
The OD (octal dump) command can display files or streams in eight, decimal, hexadecimal, and ASCII codes, which are useful for accessing or visually inspecting characters in a file that cannot be displayed directly on the terminal.
Grammar:

OD [-A address in] [-t display format] File

Option Description:
-A Address binary: Displays address information in the specified input;
-T display format: Specifies the display format of the data;

-a specifies that the address is included in the system:
o Octal (System default)
D Decimal
X hex
n Do not print displacement values

-t specifies the display format of the data, the main parameters are:
C ASCII character or backslash sequence (e.g. \ n)
D Signed Decimal number
F Floating point number
o Octal (System default)
U unsigned decimal number
x hexadecimal number

Example of execution:

#od-A x-t x filename (address is 16 binary, data is 16 binary)

$ cat Text

Hello World

The OD command

$ od-a o text #地址显示为八进制, first column address

05 0000000 062550 066154 020157 067567 066162 005144 062157 061440

06 0000020 066557 060555 062156 000012

07 0000027

$ od-a D Text #地址显示为十进制

09 0000000 062550 066154 020157 067567 066162 005144 062157 061440

10 0000016 066557 060555 062156 000012

11 0000023

$ od-a x Text #地址显示为十六进制

13 000000 062550 066154 020157 067567 066162 005144 062157 061440

14 000010 066557 060555 062156 000012

15 000017

$ od-t C Text

0000000 h e l l o w o r l d \ n o d C

0000020 o m m a n d \ n

19 0000027

Linux OD command: Display files in different 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.