How to Use DD Show Progress Command in Linux?

September 24, 2020

Introduction

The dd command-line utility is used to convert and copy files on Unix and Unix-like operating systems. By default, the dd command doesn’t show any output while transferring files.

This could be problematic when copying large files since you cannot monitor the process.

In this tutorial, you will learn how to use the dd command to show progress.

How to Use dd show progress command in linux

Prerequisites

  • A system running Linux
  • A user account with sudo or root privileges
  • Access to a terminal window / command line
  • GNU Coreutils version 8.24 or above

Check dd Version

To see the progress bar while copying files and directories with the dd command, you need a version of dd (coreutils) no older than 8.24. Check the version with the command:

dd --version
Check Coreutils version.

At the time of writing, the latest version of dd (coreutils) is 8.30 as seen in the image above.

Note: If you need to install coreutils, run: sudo apt-get install -y coreutils.

Option 1: Use the dd Command to Show Progress

The basic syntax for using the dd command is:

dd if=/path/to/input of=/path/to/output

However, the default settings do not show a progress bar or any output while the process is taking place.

To see the progress bar, add the status=progress attribute to the basic command:

dd if=/path/to/input of=/path/to/output status=progress

While the system is copying the specified file, it shows the amount of data that has been copied and the time elapsed.

dd command showing progress while copying a file.

Once the process is complete, the terminal displays the total amount of data transferred and the time duration of the process.

Output from dd command showing the process has completed.

Option 2: Use dd Command with pv to Show Progress

The pv command allows a user to see the progress of data through a pipeline. You can use it with the dd command to show the progress of a specified task.

To do so, you need to install pv.

On Ubuntu/Debian systems run:

sudo apt install pv

On CentOS/Redhat systems run:

sudo yum install pv
Install pv on Ubuntu.

To use pv with the dd command follow the syntax:

dd if=/path/to/input | pv | dd of=/path/to/output

Conclusion

After reading this article, you should know how to show progress while running the dd command, with or without the pv command.

Download a free copy of Linux Commands Cheat Sheet to help you with managing your instance of Linux.

Was this article helpful?
YesNo
Sofija Simic
Sofija Simic is an experienced Technical Writer. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Next you should read
How to Change File Permissions Recursively with chmod in Linux
July 16, 2024

Setting file and directory permission properly is important in multi-user systems such as Linux. You can set...
Read more
How to Use fsck Command to Check and Repair Filesystem
May 14, 2020

If you want to keep your filesystems clean and without errors, you need to scan it on regular basis. In this...
Read more
How to Copy Files and Directories in Linux
December 28, 2023

Want to learn how to copy files in Linux OS? This guide will show you how to use the Linux commands to copy...
Read more
Linux SCP Command: Securely Copy & Transfer Files
September 24, 2020

Tutorial on securely transferring files between Unix or Linux systems using the SCP command. The SCP or...
Read more