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 view the contents of binary files by linux

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly introduces linux how to view the contents of binary files, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let Xiaobian take you to understand.

Hexdump is a binary file viewing tool under Linux, which can convert binary files to ASCII, octal, decimal, and hexadecimal.

Format to view.

Path where the instruction is located: / usr/bin/hexdump

Command syntax:

Hexdump: [- bcCdovx] [- e fmt] [- f fmt_file] [- n length] [- s skip] [file...]

Format the output file

Hexdump test.txt

Format the first 10 bytes of the output file

Hexdump-n 10 test.txt

Format the first 10 bytes of the output file and display it in hexadecimal

Hexdump-n 10-C test.txt

Format the output 10 bytes starting at 10 and display it in hexadecimal

Hexdump-n 10-C-s 20 test.txt

1. Display the characters in the file in octal

two。 Display characters in a file in ASCII characters

3. Display the characters in the file in hexadecimal and corresponding ASCII characters

4. Format only the first n characters in the file

5. Start the output in offset format. Specify the parameter-s 5 as shown below. The previous ABCDE character is gone.

Thank you for reading this article carefully. I hope the article "how to check the contents of binary files in linux" shared by the editor will be helpful to you. At the same time, I also hope that you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!

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