加入收藏 | 设为首页 | 会员中心 | 我要投稿 佛山站长网 (https://www.0757zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Unix > 正文

LINUX与UNIX下的dd命令超详解

发布时间:2013-05-24 00:40:26 所属栏目:Unix 来源:站长网
导读:dd命令功能很强大的,对于一些比较底层的问题,使用dd命令往往可以得到出人意料的效果。用的比较多的还是用dd来备份裸设备。但是不推荐,如果需要备份oracle裸
dd命令功能很强大的,对于一些比较底层的问题,使用dd命令往往可以得到出人意料的效果。用的比较多的还是用dd来备份裸设备。但是不推荐,如果需要备份oracle裸设备,可以使用rman备份,或使用第三方软件备份,使用dd的话,管理起来不太方便。

建议在有需要的时候使用dd 对物理磁盘操作,如果是文件系统的话还是使用tar backup cpio等其他命令更加方便。

另外,使用dd对磁盘操作时,最好使用块设备文件。

Description

The dd command reads the InFile parameter or standard input, does the

specified conversions, then copies the converted data to the OutFile

parameter or standard output. The input and output block size can be

specified to take advantage of raw physical I/O. Note: The term Block

refers to the quantity of data read or written by the dd command in one

operation and is not necessarily the same size as a disk block.

if=file        输入文件名 标准输入确省

of=file        输出文件名,标准输出确省

ibs=n        输入块大小,n字节(默认512)

obs=n        输出块大小,n字节(默认512)

bs=n        同时设置输入输出块大小

cbs=n        转换缓冲区大小

files=n        在中断之前拷贝和转换n个输入文件

skip=n        拷贝之前越过n个输入块

oseek=n        拷贝之前从输出文件开始查找n个块

iseek        拷贝之前从输入文件开始查找n个块

seek=n        等同于oseek

cono=ascic        将EBCDIC码转换为ASCII

ebcdic        ASCII->;EBCDIC

   ibm        ASCII转换为EBCDIC码时轻微不同的映象

blolk        将新栈中断的ASCII码记录转换为固定长度

unblock        将固定长度的ASCII码记录转换为新行中断记录

lcase        变换字将至低等情况

ucase        变换字将至高等情况

swab        交换每对字节

noerrir        出错时不停止处理

sync        将每个块填充到ibs

输入设备:infile参数指定或标准输入

实施指定的转换,然后复制转换数据到 outfile 参数指定或标准输出。

输入块和输出块大小可以自己指定,但必须是磁盘物理块大小的倍数。

 

1

Usually, you need only write access to the output file. However,

when the output file is not on a direct-access device and you use

the seek flag, you also need read access to the file.

2

The dd command inserts new-line characters only when converting

with the conv=ascii or conv=unblock flags set; it pads only when

converting with the conv=ebcdic, conv=ibm, or conv=block flags

set.

(编辑:佛山站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读