其他分享
首页 > 其他分享> > xxd使用方法

xxd使用方法

作者:互联网

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

 

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

命令 功能
xxd [options] infile outfile 将输入文件(infile)每个字节转换为可读十六进制结果写入输出文件(outfile),默认格式为“起始地址: 字节1字节2 字节3字节4 ... ... 字节15字节16  字符1字符2... ...字符16\n”
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\n”
xxd -e infile outfile 按输出文件(outfile)中将读入数据按小端模式显示,从输入文件低地址读到的字节写入输出文件(outfile)的高地址
xxd -g num infile outfile 在输出文件(outfile)中每num个字节一组显示,组与组之间插入空格,默认为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  显示版本信息

标签:文件,字节,输出,xxd,outfile,使用,方法,infile
来源: https://www.cnblogs.com/pandabang/p/14800250.html