如何从bash查看二进制文件? [英] How to view files in binary from bash?

查看:134
本文介绍了如何从bash查看二进制文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想查看当前目录中文件的内容,但可以从命令行以二进制形式查看.我该如何实现?

I would like to view the contents of a file in the current directory, but in binary from the command line. How can I achieve this?

推荐答案

xxd 可以同时使用二进制和十六进制.

xxd does both binary and hexadecimal.

bin:

xxd -b file

十六进制:

xxd file

这篇关于如何从bash查看二进制文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆