linux 命令 — dd

來源:互聯網
上載者:User

dd: convert and copy a file,具體用法見協助手冊。

例1:要把一張磁碟片的內容拷貝到另一張磁碟片上,利用/tmp作為臨時儲存區。把來源硬碟插入磁碟機中,輸入下述命令:

$ dd if =/dev/fd0 of = /tmp/tmpfile
拷貝完成後,將來源硬碟從磁碟機中取出,把目標盤插入,輸入命令:
$ dd if = /tmp/tmpfile of =/dev/fd0
磁碟片拷貝完成後,應該將臨時檔案刪除:
$ rm /tmp/tmpfile
 
例2:把net.i這個檔案寫入磁碟片中,並設定讀/寫緩衝區的數目。
(注意:磁碟片中的內容會被完全覆蓋掉)
$ dd if = net.i of = /dev/fd0 bs = 16384
 
例3:將檔案sfile拷貝到檔案 dfile中。
$ dd if=sfile of=dfile

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.