dd
Copy and convert data blocks between files with block-level precision. Supports preview and dry-run to avoid unintended overwrites.
Instructions
Copy and convert data blocks between input and output with bounded preview and dry-run support. Destructive to output: writes data to the destination file. Use --dry_run to preview the operation. Returns JSON with bytes read/written and throughput. Use for block-level data copying and format conversion. Not for simple file copying — use 'cp' for files and directories. See also 'cp', 'truncate'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bs | No | Block size in bytes. | |
| raw | No | Write selected input bytes without a JSON envelope. | |
| conv | No | Comma-separated conversions: notrunc, noerror, fsync, sync. | |
| seek | No | Output blocks to seek before writing. | |
| skip | No | Input blocks to skip. | |
| count | No | Number of input blocks to copy. | |
| input | No | Input file, or '-' for stdin. | - |
| output | No | Output file, or '-' for stdout/no file output. | - |
| dry_run | No | Report without writing output. | |
| parents | No | Create missing output parent directories. | |
| operands | No | GNU-style key=value operands (if=, of=, bs=, count=, ...). | |
| allow_overwrite | No | Allow replacing an existing output file. | |
| max_preview_bytes | No | Maximum JSON preview bytes. |