免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1947 | 回复: 8
打印 上一主题 下一主题

dd命令用法,特急!!! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-08-21 14:35 |只看该作者 |倒序浏览
各位大虾,有谁知道如何用dd命令将一块硬盘的前1024K block 的数据拷贝到另一块硬盘上。
先谢谢了!!

论坛徽章:
0
2 [报告]
发表于 2006-08-21 18:53 |只看该作者
dd if=源盘   of=目的盘 bs=块大小
源盘:/dev/rdsk/c0t0d0s2
目的盘:/dev/rdsk/c0t1d0s2

论坛徽章:
0
3 [报告]
发表于 2006-08-22 10:47 |只看该作者
UP```````````UP`!

论坛徽章:
0
4 [报告]
发表于 2006-08-22 14:38 |只看该作者
原帖由 johnhjx 于 2006-8-21 18:53 发表
dd if=源盘   of=目的盘 bs=块大小
源盘:/dev/rdsk/c0t0d0s2
目的盘:/dev/rdsk/c0t1d0s2



没仔细看LZ的话...原来是前1024K

我编辑一下,楼下用过的兄弟们上

[ 本帖最后由 henghengxj 于 2006-8-22 15:11 编辑 ]

论坛徽章:
0
5 [报告]
发表于 2006-08-22 14:41 |只看该作者
呵呵,顶一下

论坛徽章:
0
6 [报告]
发表于 2006-08-22 15:06 |只看该作者
楼主问的是将硬盘的   前  1024k block 的数据拷贝到另一块硬盘上 ,  
bs 的参数的意思是:
bs=n  Sets both input and output block  sizes  to  n  bytes,
           superseding ibs= and obs=. If no conversion other than
           sync, noerror, and notrunc is  specified,  each  input
           block  is  copied  to  the  output  as  a single block
           without aggregating short blocks.

而实现楼主的要求应该用 count 这个参数,具体我也没用过 !

我觉得这样可以:dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2 count=1024 bs=****

哪位用过,出来指正一下!

论坛徽章:
0
7 [报告]
发表于 2006-08-22 15:45 |只看该作者
dd if=dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t1d0s2 count=2048

论坛徽章:
0
8 [报告]
发表于 2006-08-22 22:37 |只看该作者
This is an example on Solaris9.

# dd if=/dev/rdsk/c2t0d4s6 of=/tmp/testfile bs=1024 count=1024
1024+0 records in
1024+0 records out
#
# ls -l testfile
-rw-r--r--   1 root     other    1048576 Aug 22 21:44 testfile
#

[ 本帖最后由 susbin 于 2006-8-23 22:32 编辑 ]

论坛徽章:
0
9 [报告]
发表于 2006-09-26 18:46 |只看该作者

补充

dd if=/dev/rdsk/c0t0d0s2 of=/dev/rdsk/c0t2d0s2 bs=1024 2048 3072 4096 5120 6144 7168 8192 一般为2048或4096,8192是现在硬盘得最大缓存了
dd if=源盘   of=目的盘 bs=块大小
源盘:/dev/rdsk/c0t0d0s2
目的盘:/dev/rdsk/c0t1d0s2
但在有得机器上不能加bs,如果加了会直接写成/dev/rdsk目录下面的文件。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP