xxd
是Linux
平台下的一款工具,可以用于原文件
和二进制文件
之间的互相转换。man page
描述:1
2
3
4
5xxd creates a hex dump of a given file or standard input. It can also
convert a hex dump back to its original binary form. Like uuencode(1)
and uudecode(1) it allows the transmission of binary data in a `mail-
safe' ASCII representation, but has the advantage of decoding to stan‐
dard output. Moreover, it can be used to perform binary file patching
xxd
常用方法
1 | ➜ ~ echo 'hello,world' > origin.txt |
xxd还支持将文件转换成二进制,格式化输出等。具体可查看官方文档
参考:
1.linux-man-page-xxd