帮助文档

l@l-PC:/lib64$ xxd --help
Usage:                                                                                                                                                                                        xxd [options] [infile [outfile]]                                                                                                                                                       or                                                                                                                                                                                        xxd -r [-s [-]offset] [-c cols] [-ps] [infile [outfile]]
Options:                                                                                                                                                                                      -a          toggle autoskip: A single '*' replaces nul-lines. Default off.                                                                                                                -b          binary digit dump (incompatible with -ps,-i,-r). Default hex.                                                                                                                 -C          capitalize variable names in C include file style (-i).                                                                                                                       -c cols     format <cols> octets per line. Default 16 (-i: 12, -ps: 30).                                                                                                                  -E          show characters in EBCDIC. Default ASCII.                                                                                                                                     -e          little-endian dump (incompatible with -ps,-i,-r).                                                                                                                             -g          number of octets per group in normal output. Default 2 (-e: 4).                                                                                                               -h          print this summary.-i          output in C include file style.-l len      stop after <len> octets.-o off      add <off> to the displayed file position.-ps         output in postscript plain hexdump style.-r          reverse operation: convert (or patch) hexdump into binary.-r -s off   revert with <off> added to file positions found in hexdump.-s [+][-]seek  start at <seek> bytes abs. (or +: rel.) infile offset.-u          use upper case hex letters.-v          show version: "xxd V1.10 27oct98 by Juergen Weigert".

用法

直接读取xxd

l@l-PC:~$ cat 1.txt
12345
l@l-PC:~$ xxd 1.txt
00000000: 3132 3334 350a                           12345.

指定格式[-ps]

output in postscript plain hexdump style

l@l-PC:~$ xxd -ps  1.txt
31323334350a

指定长度[-l 3]

l@l-PC:~$ xxd -ps -l 3  1.txt
313233

指定偏移[-s1]

l@l-PC:~$ xxd -ps -l 3  -s1 1.txt
323334

转换[-r]

l@l-PC:~$ xxd -ps  1.txt  > 1.bin
l@l-PC:~$
l@l:~$ xxd  -r -ps  1.bin
12345

linux命令:xxd读取二进制文件相关推荐

  1. python实现linux命令输出两列_Python实现Linux命令xxd -i功能

    def Xxdi(): #解析命令行选项及参数 ([base, cols, strip], [inFile, outFile]) = ParseOption() import os if os.pat ...

  2. linux编译python语言指令_Python实现Linux命令xxd -i功能

    一. Linux xxd -i功能 Linux系统xxd命令使用二进制或十六进制格式显示文件内容.若未指定outfile参数,则将结果显示在终端屏幕上:否则输出到outfile中.详细的用法可参考li ...

  3. Linux 命令xxd功能

    Linux 命令xxd功能 一. Linux 命令 xxd 二. Linux xxd -i 功能 三. xxd -i 常见用途 四. xxd 其他选项用法 Linux下的xxd命令,能将一个给定文件或 ...

  4. linux 命令 xxd linux下查看二进制文件

    转载:http://fancyxinyu.blog.163.com/blog/static/18232136620111183019942/ 当我们需要把二进制转成c语言中使用的16进制字符数组时,命 ...

  5. linux 命令 xxd

    xxd,可以查看linux下文件的二进制表示,man一下xxd,可以得到以下信息 NAME        xxd - make a hexdump or do the reverse. SYNOPSI ...

  6. Linux 命令xxd输出十六进制

    xxd能将一个给定文件或标准输入转换为十六进制形式,也能将十六进制转换回二进制形式. Usage:        xxd [options] [infile [outfile]]     or     ...

  7. 【linux】 xxd命令功能

    参考自:<Linux 命令xxd输出十六进制> <Python实现Linux命令xxd -i功能> Linux下的xxd命令,能将一个给定文件或标准输入转换为十六进制形式,也能 ...

  8. Linux中xxd的简单应用

    xxd的作用就是将一个文件以十六进制的形式显示出来,具体选项如下. -a : 它的作用是自动跳过空白内容,默认是关闭的 -c : 它的后面加上数字表示每行显示多少字节的十六进制数,默认是16字节. - ...

  9. 用于提权的Linux命令,即“xxd”

    导读 本文将为大家介绍另一个可用于提权的Linux命令,即"xxd".xxd命令的作用是将给定的标准输入或者文件,做一次十六进制的输出,反之它也可以将十六进制的输出转换为原来的二进 ...

最新文章

  1. win 2003 IIS如何防止代码注入
  2. C语言unit test单元测试类的实现(附完整源码)
  3. mysql rsync复制,mysql复制又同步
  4. mxnet深度学习(NDArray)
  5. --6、专业信息表(表)
  6. vue根据屏幕大小适配表格高度
  7. 毕设无忧|单片机类毕设论文模板
  8. 64qam带宽计算_信道带宽计算参考
  9. word 论文排版相关
  10. 十六条超炫代码让你的QQ空间改头换面(转)
  11. iOS开发- 实现类似于陌陌点点和探探首页切换效果类似
  12. 计算机毕业设计之java+ssm学生网上请假系统
  13. FPGA功耗那些事儿(转载)
  14. os.path.dirname(os.path.realpath(__file__))
  15. IDEA中创建编写JSP
  16. python-比较两个文件交集、并集、差集
  17. 微型计算机海关编码是,海关HS编码对照表..doc
  18. 游戏服务器如何选择合适的服务器配置
  19. 智慧城市的下一站-空间驱动智慧场景
  20. 炒鞋:一半潮流,一半金钱

热门文章

  1. c++中vector的 = 与 assign的区别
  2. excel中sumif统计位数,结果不准确
  3. 深度学习下运维日志分析的趋势解读与应用实践
  4. Qt5.9中在Pixmap图片设备上绘制线段实例
  5. 火车头采集细节(二)
  6. window cmd删除文件、强制删除文件
  7. C语言指针详解(补充中)
  8. 记录下Makefile
  9. lisp如何批量选中特定图层_cad怎么选中整个图层(cad 怎样快速选中后锁定所有图层 只显示一个图层)...
  10. 逻辑运算符与位运算符的区别