sg_dd和普通的dd,除了底层的实现方式不同,有什么用户角度可感知的实质区别?

其它类软件,非上述版软件
回复
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

sg_dd和普通的dd,除了底层的实现方式不同,有什么用户角度可感知的实质区别?

#1

帖子 科学之子 » 2016-10-07 0:05

sg_dd和普通的dd,除了底层的实现方式不同,有什么用户角度可感知的实质区别?
比如可以读取到普通dd无法读取到的数据之类吗?

例如:
http://www.dr-lex.be/hardware/china_pho ... g.html#fat
我这里普通dd命令无果,只能看到普通的用户可见数据
图片
如果换成类似如下命令:

代码: 全选

sg_dd if=/dev/sg3 of=phone.dat
(用sg_map -i来确定sg*的具体数字)
就能看到系统数据了是吗?

跑题:
虽然只要试一试就知道了,但现在暂时不便测试,所以就先发帖了
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: sg_dd和普通的dd,除了底层的实现方式不同,有什么用户角度可感知的实质区别?

#3

帖子 poloshiao » 2016-10-07 7:14

1. http://www.linux-tutorial.info/modules. ... page=sg_dd
sg_dd
Similar syntax and semantics to dd(1) but does not perform any conversions.

bs=BYTES
this must be the block size of the physical device.
Note that this differs from dd(1) which permits
"bs" to be an integral multiple. Default is 512
which is usually correct for disks but incorrect
for cdroms (which normally have 2048 byte blocks).


2. http://sg.danny.cz/sg/sg_dd.html
The Linux sg_dd utility
One restriction that sg_dd imposes when either the IFILE or OFILE are accessed via SCSI commands is that BS (i.e. the block size) must match that of the device. Further, if both the IFILE and OFILE are accessed via SCSI commands then BS must match that of both devices.
... 以下描述 請自行詳細閱讀
回复