网站首页 文章专栏 centos 安装xxd工具十六进制编辑
centos 安装xxd工具十六进制编辑
编辑时间:2019年11月30日 13:14 作者:赵彦昌 浏览量:8639

系统环境:centos7

xxd 一般是配合vim 使用的。可以编辑把文件 转储为十六进制的工具。部分法,可以 参考:https://zhuanlan.zhihu.com/p/24883064


centos 7 系统默认是没有安装这个 命令的,它在vim-common 包里面。

安装:


[root@fine-bits-1 tmp]# yum install vim-common
[root@fine-bits-1 tmp]# xxd -h
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 cols     format <cols> octets per line. Default 16 (-i: 12, -ps: 30).
    -E          show characters in EBCDIC. Default ASCII.
    -g          number of octets per group in normal output. Default 2.
    -h          print this summary.
    -i          output in C include file style.
    -l len      stop after <len> octets.
    -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".


来说两句吧
最新评论