Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use the od command of Linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

Today, the editor will share with you the relevant knowledge points about how to use the od command of Linux. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look.

The Linux common command od command is used to output the contents of the file, and the od command reads the contents of the given file and presents its contents in octal code.

Syntax od [- abcdfhilovx] [- A] [- j] [- N] [- s] [- t] [- w] [--help] [--version] [file.] Parameters:

-a this parameter has the same effect as specifying the "- ta" parameter at the same time.

-A chooses what cardinality to calculate the word code.

-b the effect of this parameter is the same as specifying the "- toC" parameter at the same time.

-c the effect of this parameter is the same as specifying the "- tC" parameter at the same time.

-d this parameter has the same effect as specifying the "- tu2" parameter at the same time.

-f this parameter has the same effect as specifying the "- tfF" parameter at the same time.

-h this parameter has the same effect as specifying the "- tx2" parameter at the same time.

-I this parameter has the same effect as specifying the "- td2" parameter at the same time.

The number of characters set by-j or-skip-bytes= skipped.

-l this parameter has the same effect as specifying the "- td4" parameter at the same time.

-N or-read-bytes= up to the set number of characters.

-o this parameter has the same effect as specifying the "- to2" parameter at the same time.

-s or-strings= displays only strings that match the specified number of characters.

-t or-format= sets the output format.

Duplicate data is not omitted when-v or-output-duplicates is output.

-w or-width= sets the maximum number of characters per column.

-x the effect of this parameter is the same as specifying the "- h" parameter at the same time.

-help online help.

-version displays version information.

Create a tmp file for an instance:

$echo abcdef g > tmp $cat tmp abcdef g use the od command:

$od-b tmp 0000000 14114141441445040 147012 0000011 uses a single-byte octal interpretation for output. Note that the default address format on the left is eight bytes:

$od-c tmp 0000000 a b c d e f g\ n 0000011 uses ASCII codes for output, note that escape characters are included

$od-t D1 tmp 0000000 97 98 99 100 101 102 32 103 10 0000011 is interpreted using single byte decimal

$od-A d-c tmp 0000000 a b c d e f g\ n more than 0000009 is all the contents of this article entitled "how to use Linux's od commands". Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report