差分
このページの2つのバージョン間の差分を表示します。
| 次のリビジョン | 前のリビジョン | ||
| tips:linux:common:dd [2025/09/15 21:51] – 作成 asaasa | tips:linux:common:dd [2025/09/16 06:14] (現在) – [sda の MBR をバックアップ] asaasa | ||
|---|---|---|---|
| 行 12: | 行 12: | ||
| </ | </ | ||
| + | このコマンドはディスク領域を予約するだけなので手早くファイルができるけれど、スワップ領域を作るには適していないらしいので注意。 | ||
| ==== sda の MBR をバックアップ ==== | ==== sda の MBR をバックアップ ==== | ||
| GPTパーティションの場合は無意味。 | GPTパーティションの場合は無意味。 | ||
| <code bash> | <code bash> | ||
| - | dd if=/dev/sda of=/ | + | root# dd if=/dev/sda of=/ |
| </ | </ | ||
| 行 32: | 行 33: | ||
| ==== バイナリダンプする ==== | ==== バイナリダンプする ==== | ||
| + | |||
| <code bash> | <code bash> | ||
| root# od zero1KB.dat | root# od zero1KB.dat | ||
| root# hexdump -C zero1KB.dat | root# hexdump -C zero1KB.dat | ||
| - | </codeh> | + | </code> |