In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains the "Linux od command use case analysis", the article explains the content is simple and clear, easy to learn and understand, now please follow the editor's train of thought slowly in depth, together to study and learn "Linux od command use case analysis" bar!
Linux common command od command is used to output octal, hexadecimal or other format encoded bytes of a file, usually used to display or view characters in the file that cannot be directly displayed on the terminal.
Bytes encoded in octal, hexadecimal, and other formats of od output files
Add that the common files are text files and binary files. This command is mainly used to view the values saved in the binary file. For example, a program may output a large number of data records, each of which is a single-precision floating-point number. These data records are stored in a file, and if you want to view this data, the od command will come in handy. In my opinion, the od command is mainly used to format the output file data, that is, to interpret the data in the file without ambiguity. Whether it is floating-point numbers in IEEE754 format or ASCII codes, the od command can output their values as required.
Syntax od (option) (parameter) option-a: the effect of this parameter is the same as specifying the "- ta" parameter at the same time;-A toC: choosing which cardinality to calculate the word code;-b: the effect of this parameter is the same as specifying the "- tC" parameter at the same time;-c: the effect of this parameter is the same as specifying the "- tu2" parameter at the same time;-d: the effect of this parameter is the same as specifying the "- tu2" parameter at the same time. -f: the effect of this parameter is the same as that of specifying "- tfF" parameter at the same time;-h: the effect of this parameter is the same as that of specifying "- tx2" parameter at the same time;-I: the effect of this parameter is the same as that of specifying "- td2" parameter at the same time; the number of characters skipped by-j or-skip-bytes=:;-l: the effect of this parameter is the same as that of specifying "- td4" parameter at the same time -N or-- read-bytes=: to the set character tree;-o: this parameter has the same effect as specifying the "- to2" parameter at the same time;-s or-- strings=: only displays strings that match the specified number of characters;-t or-- format=: sets the output format;-v or-- output-duplicates: data that is output without omitting repetition;-w or-- width=: sets the maximum number of characters per column -x: this parameter has the same effect as specifying the "- h" parameter at the same time;-- help: online help;-- version: displays version information. Parameter file: specifies the file to display.
Example [linuxde@localhost ~] $echo abcdef g > tmp [linuxde@localhost ~] $cat tmp abcdef g description: prepare a tmp file first
[linuxde@localhost ~] $od-b tmp 0000000 1414414414440147012 0000011 description: use single-byte octal interpretation for output. Note that the default address format on the left is eight bytes.
[linuxde@localhost ~] $od-c tmp 0000000 a b c de f g\ n 0000011 description: use ASCII code for output, note that escape characters are included
[linuxde@localhost ~] $od-t D1 tmp 0000000 97 98 99 101 102 32 103 10 0000011 description: explain using single byte decimal
[linuxde@localhost ~] $od-AD-c tmp 0000000 a b c de f g\ n 0000009 description: set the address format to decimal.
[linuxde@localhost ~] $od-A x-c tmp 000000 a b c de f g\ n 000009 description: set address format to hexadecimal
[linuxde@localhost] $od-j 2-c tmp 0000002 c de f g\ n 0000011 description: skip the first two bytes
[linuxde@localhost ~] $od-N 2-j 2-c tmp 0000002 c d 0000004 description: skip the first two bytes and output only two bytes
[linuxde@localhost] $od-W1-c tmp 0000000 a 0000001 b 0000002 c 0000003 d 0000004 e 0000005 f 0000006 0000007 g 0000010\ n0000011 description: output only 1 byte per line
[linuxde@localhost] $od-W2-c tmp 0000000 a b 0000002 c d 0000004 e f 0000006 g 0000010\ n0000011 description: output two bytes per line
[linuxde@localhost ~] $od-w3-b tmp 0000000 1411443 0000003 1441460000006 040 147012 0000011 description: output 3 bytes per line and interpret using octal single byte
Thank you for your reading, the above is the "Linux od command use case analysis" content, after the study of this article, I believe you have a deeper understanding of the Linux od command use example analysis of this problem, the specific use also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.