如何创建一个只包含十六进制字符没有在bash空格的文件的十六进制转储? [英] How to create a hex dump of file containing only the hex characters without spaces in bash?

查看:113
本文介绍了如何创建一个只包含十六进制字符没有在bash空格的文件的十六进制转储?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何创建一个未经修改六角使用bash在Linux中的二进制文件的转储?在 OD hexdump都命令垃圾堆里都插入空格,这是不理想的。

How do I create an unmodified hex dump of a binary file in Linux using bash? The od and hexdump commands both insert spaces in the dump and this is not ideal.

有没有办法简单地写了一长串的所有十六进制字符,减去输出空格或换行符?

Is there a way to simply write a long string with all the hex characters, minus spaces or newlines in the output?

推荐答案

XXD -p文件

或者,如果你想这一切在一行上:

Or if you want it all on a single line:

XXD -p文件| TR -d的'\\ n'

这篇关于如何创建一个只包含十六进制字符没有在bash空格的文件的十六进制转储?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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