Linux dd命令功能及参数介绍

2016年3月16日12:23:16实用信息评论574

dd命令功能

把指定的输入文件拷贝到指定的输出文件中,并且在拷贝过程中可以进行格式转换。可以用该命令实现DOS下的diskcopy命令的作用。先用dd命令把软盘上的数据写成硬盘的一个寄存文件,再把这个寄存文件写入第二张软盘上,完成diskcopy的功能。需要注意的是,应该将硬盘上的寄存文件用rm命令删除掉。系统默认使用标准输入文件和标准输出文件。文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

dd命令使用方法

dd [选项]文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

例如:dd if=/dev/zero of=/tmp/swap bs=1MB count=1024文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

dd命令参数介绍

if =输入文件(或设备名称)。文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

of =输出文件(或设备名称)。文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

ibs = bytes 一次读取bytes字节,即读入缓冲区的字节数。文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

skip = blocks 跳过读入缓冲区开头的ibs*blocks块。文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

obs = bytes 一次写入bytes字节,即写入缓冲区的字节数。文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

bs = bytes 同时设置读/写缓冲区的字节数(等于设置ibs和obs)。文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

cbs = byte 一次转换bytes字节。文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

count=blocks 只拷贝输入的blocks块。文章源自堕落的鱼-https://www.duoluodeyu.com/2305.html

匿名

发表评论

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定