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

The usage of the Linux basic command od

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article introduces the relevant knowledge of "the usage of the Linux basic command od". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Od

Displays the contents of the specified file in octal, decimal, hexadecimal, and so on. The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.

1. Grammar

Od [options] file

Od [- abcdfilosx]... [FILE] [[+] OFFSET [.] [b]]

Od-- traditional [OPTION]... [FILE] [[+] OFFSET [.] [b] [+] [LABEL] [.] [b]]

2. List of options

Option

Description

-- version

Display command version information

-- help

Show help documentation

-A |-- address-radix=RADIX

Sets the coding unit of the offset

-j |-- skip-bytes=BYTES

Skip the characters of the specified title

-N |-- read-bytes=BYTES

Output specified number of characters

-S |-- strings [= BYTES]

Output a string of at least BYTES graphic characters

-t |-- format=TYPE

Specify output format

-w |-- width [= BYTES]

Set the maximum number of words per line

-v |-- output-duplicates

Display duplicate data

-- traditional

Accept the traditional form of parameters

3. Examples

1) display content in octal

[root@localhost weijie] # cat 3.c / / View content

12345

2334

two hundred and twelve

[root@localhost weijie] # od 3.c / / display in octal

0000000 031061 032063 005065 031462 032063 031012 031061 000012

0000017

2) display the content in character form

[root@localhost weijie] # cat 1.c / / View content

Hello world

I am david.

I love linux

Love code.

[root@localhost weijie] # od-t c 1.c / / is displayed in character format

0000000 h e l l o w o r l d,\ n I

0000020 a m d a v i d. \ n i l o v

0000040 e l i n u x,\ n l o v e c

0000060 o d e. \ n

0000065

This is the end of the introduction to "the usage of the Linux basic command od". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Servers

Wechat

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

12
Report