zoukankan      html  css  js  c++  java
  • xxd使用方法

    造冰箱的大熊猫@cnblogs 2021/5/23

    将xxd命令的主要用法小结一下:

    命令 功能
    xxd [options] infile outfile 将输入文件(infile)每个字节转换为可读十六进制结果写入输出文件(outfile),默认格式为“起始地址: 字节1字节2 字节3字节4 ... ... 字节15字节16  字符1字符2... ...字符16 ”
    xxd -b infile outfile 将输入文件(infile)每个字节转换为可读二进制结果写入输出文件(outfile)
     xxd -s offset -l length infile outfile 从输入文件(infile)偏移址offset开始连续读取length个字节
     xxd -u infile outfile 在输出文件(outfile)中使用大写字符显示十六进制数,默认为小写字符
    xxd -c col infile outfile 在输出文件(outfile)中按每行col列(col个字节)显示,默认为每行16个字节
    xxd -ps infile outfile 在输出文件(outfile)中输出格式为“字节1字节2字节3... ...字节15字节16 ”
    xxd -e infile outfile 按输出文件(outfile)中将读入数据按小端模式显示,从输入文件低地址读到的字节写入输出文件(outfile)的高地址
    xxd -g num infile outfile 在输出文件(outfile)中每num个octet(4bit二进制数)一组显示,组与组之间插入空格,默认为num=2
    xxd -i infile outfile 将输入文件(infile)中的字节转换为unsigned char数组类型写入输出文件(outfile),数组名由输入文件名决定
    xxd -i -C infile outfile 将输入文件(infile)中的字节转换为unsigned char数组类型写入输出文件(outfile),数组名由转换为大写字母的输入文件名决定
    xxd -o num infile outfile 输出文件(outfile)中,起始地址从num开始,默认为0
     xxd -r [options] infile outfile  将输入文件(infile)从可读十六进制格式转换为二进制格式写入输出文件(outfile)
     xxd -r -ps infile outfile  将ps格式的输入文件(infile)从可读十六进制格式转换为二进制格式写入输出文件(outfile)
     xxd -h  显示帮助文件
     xxd -h  显示版本信息
  • 相关阅读:
    [FJOI2016] 建筑师
    AtCoder
    [Poetize6] IncDec Sequence
    CodeForces
    洛谷 P4551 最长异或路径
    WC 2018/CTSC 2018/APIO 2018 游记
    洛谷 P4538 收集邮票
    「PKUWC 2018」随机算法 (60分部分分做法)
    bzoj 3718: [PA2014]Parking
    bzoj 1023: [SHOI2008]cactus仙人掌图 2125: 最短路 4728: 挪威的森林 静态仙人掌上路径长度的维护系列
  • 原文地址:https://www.cnblogs.com/pandabang/p/14800250.html
Copyright © 2011-2022 走看看