Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Show Progress with the dd Command in Linux

dd copies data block by block. Add status=progress to see how far it is.

VPS and Cloud Servers2 min read8 screenshots

What dd does

dd copies and converts data. It is used to make disk images, clone partitions and create bootable drives. By default it prints nothing until it finishes, which is hard to bear with large copies. The option status=progress shows the amount copied, the speed and the time elapsed.

Syntax

dd if=<input_file> of=<output_file> [options]
  • if= is the input file or device.
  • of= is the output file or device.
  • [options] are extras, such as the block size.
Warning: A wrong of= can overwrite a disk and destroy your data. Check the names with lsblk before you run dd.

Show progress

dd if=input_file of=output_file status=progress
dd with status=progress

Useful options

**Block size (bs).** A larger block makes the copy faster:

dd if=input_file of=output_file bs=1M status=progress
dd with a block size of 1 MB

**Count (count).** Copy only a number of blocks:

dd if=input_file of=output_file bs=512 count=1000 status=progress
dd with bs=512 and count=1000

This copies 512,000 bytes.

**Skip (skip).** Skip blocks at the start of the input:

dd if=input_file of=output_file bs=1M skip=100 status=progress
dd with skip

It skips the first 100 MB of the input.

**Seek (seek).** Start writing after a number of blocks in the output:

dd if=input_file of=output_file bs=1M seek=50 status=progress
dd with seek

**Conversion (conv).** Common values:

  • notrunc does not cut the output file.
  • noerror continues after read errors.
  • sync pads incomplete blocks with zeros.
dd if=input_file of=output_file conv=sync,noerror status=progress
dd with conv=sync,noerror

This helps when you copy from a faulty disk.

Make a disk image

sudo dd if=/dev/sda of=/path/to/disk_image.img bs=1M status=progress
Creating a disk image

To restore the image, swap if and of.

Clone a partition

sudo dd if=/dev/sda1 of=/dev/sdb1 bs=1M status=progress
Cloning a partition

The target partition must be at least as big as the source, and it must not be in use.

Quick recap

  • status=progress shows live progress.
  • Use bs=1M for speed.
  • Always check if= and of= before you press Enter.