GBase 8s
运维管理
文章

dd读取与写入整页

GBase社区管理员
发表于2023-05-16 09:08:2919次浏览0个评论

查看页面的内容(十六进制):

dd if=/opt/chunks/poc/datachk11 bs=8192 count=1 skip=116984 |od -x

导出正常的数据页:

dd if=/opt/chunks/poc/datachk5 bs=8192 count=1 skip=116984 of=/tmp/1.log

把数据页写入:

dd of=/opt/chunks/poc/datachk5 seek=11685 if=/tmp/1.log

skip表示跳过if后文件的单位数量;

seek表示跳过of后文件的单位数量

评论已关闭