OS XのddはUNIXバージョンと同じですか?

OS XのddはUNIXバージョンと同じですか?

apple.stackexchangeでこの質問をすることを検討しましたが、「NIX群衆」がより良い応答を生成する可能性が高いことを直感的に知ることができます。

dd(OS Xバージョン)UNIX(私はUbuntuを使用しています)と命令がどう違うのですか?私の考えではSDカードのコピーddOS Xリンクで指定されているとおりです。

OS Xのマニュアルページからの抜粋dd

DESCRIPTION
     The dd utility copies the standard input to the standard output.  Input
     data is read and written in 512-byte blocks.  If input reads are short,
     input from multiple reads are aggregated to form the output block.  When
     finished, dd displays the number of complete and partial input and output
     blocks and truncated input records to the standard error output.

ベストアンサー1

BSDにはステータスオプションがないなど、いくつかの小さな違いがありますが、ddそれについてあまり心配しません。 AFAIKのコアオプションは同じです。

次のコマンドをrootとして実行し、diskX/をdiskYディスク識別子(たとえばdisk1、またはdisk2)に置き換えます。

# list all disks to find your disk identifier
diskutil list

# unmount your sd card if it is mounted (see `df` or `mount`)
diskutil unmountDisk /dev/diskX

# copy of your sd card to an image file 
dd if=/dev/rdiskX of=sdcard.img bs=1m

# or copy your image file back to an sd card
dd if=sdcard.img of=/dev/rdiskX bs=1m

# or copy your sd card to a different device
dd if=/dev/rdiskX of=/dev/rdiskY bs=1m

私が使用しているディスク/dev/rdisk(rawディスク)は通常、バッファリングされたディスクよりも高速です/dev/disk

dd実行中の進行状況を表示するには、Ctrl-を押しますTここ)。

おすすめ記事