Linux中如何查看16进制文件?由于最近有项目需求,需要对采集回来的数据进行解析和处理,而源数据是十六进制格式的,下面为大家详细讲解一下Linux下查看16进制文件具体方法。

在vim中查看
:%!xxd -g 1 表示每1个字节为1组:%!xxd -g 2 表示每2个字节为1组(默认):%!xxd -g 4 表示每4个字节为1组:%!xxd -r 将vim恢复成原来的显示
示例:”vim rtpreciver_tmp1.ps”—->”:%!xxd -g 1″,效果如下:

命令查看(hexdump )
hexdump -C rtpreciver_tmp1.ps | more //查看rtpreciver_tmp1.ps文件的16进制格式,效果图如下:

以上就是良许教程网为各位朋友分享的Linu系统相关内容。想要了解更多Linux相关知识记得关注公众号“良许Linux”,或扫描下方二维码进行关注,更多干货等着你 !
