BSD dd Cheatsheet #
dd
is used to convert and copy files, providing a way to manipulate raw data on BSD systems.
Basic Usage #
Command/Option | Example | Description |
---|---|---|
dd if=file of=file | dd if=input.img of=output.img | Copy data from input file to output file |
dd if=file of=file bs=1m | dd if=input.img of=output.img bs=1m | Set block size to 1 MB |
dd if=file of=file count=100 | dd if=input.img of=output.img count=100 | Copy only 100 blocks |
dd if=file of=file skip=10 | dd if=input.img of=output.img skip=10 | Skip 10 blocks at the start of the input file |
dd if=file of=file seek=10 | dd if=input.img of=output.img seek=10 | Skip 10 blocks at the start of the output file |
Advanced Usage #
Command/Option | Example | Description |
---|---|---|
dd if=file of=file conv=noerror,sync | dd if=input.img of=output.img conv=noerror,sync | Continue after read errors and pad blocks with zeros |
dd if=file of=file status=progress | dd if=input.img of=output.img status=progress | Show progress information during operation |
dd if=file of=file bs=4k | dd if=input.img of=output.img bs=4k | Set block size to 4 KB |
This cheatsheet covers essential dd
commands and options for BSD systems.