十六进制转储反向命令 [英] Hexdump reverse command

查看:76
本文介绍了十六进制转储反向命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

hexdump 命令可将任何文件转换为十六进制值.

The hexdump command converts any file to hex values.

但是如果我有十六进制值并且我想逆转该过程怎么办?

But what if I have hex values and I want to reverse the process, is this possible?

推荐答案

有一个名为 xxd 的类似工具.如果仅使用文件名运行 xxd ,它将以相当标准的十六进制转储格式转储数据:

There is a similar tool called xxd. If you run xxd with just a file name it dumps the data in a fairly standard hex dump format:

# xxd bdata
0000000: 0001 0203 0405
......

现在,如果使用 -r 选项将输出通过管道传递回 xxd 并将其重定向到新文件,则可以将十六进制转储转换回二进制文件:/p>

Now if you pipe the output back to xxd with the -r option and redirect that to a new file, you can convert the hex dump back to binary:

# xxd bdata | xxd -r >bdata2
# cmp bdata bdata2
# xxd bdata2
0000000: 0001 0203 0405

这篇关于十六进制转储反向命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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