Skip to content

Instantly share code, notes, and snippets.

@draekko
Last active January 14, 2016 13:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save draekko/3164b7c93b626dc65f9d to your computer and use it in GitHub Desktop.
Save draekko/3164b7c93b626dc65f9d to your computer and use it in GitHub Desktop.
how to monitor the progress of dd (ubuntu)
Install pv and put it between input / output only dd commands.
Note: you cannot use it when you already started dd.
From the package description:
pv - Pipe Viewer - is a terminal-based tool for monitoring the progress of data through a pipeline. It can be inserted into any normal pipeline between two processes to give a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion.
Installation
sudo apt-get install pv
Example
dd if=/dev/urandom | pv | dd of=/dev/null
Output
1,74MB 0:00:09 [ 198kB/s] [ <=> ]
You could specify the approximate size with the --size if you want a time estimation.
Other uses
You can also use it to output to stdout:
pv /home/user/bigfile.iso | md5sum
Output
50,2MB 0:00:06 [8,66MB/s] [=======> ] 49% ETA 0:00:06
Note that in this case, pv recognizes the size automatically.
Note that the parameters for "dd" are appropriate in the first or
second half of the pipe:
dd if=/dev/zero bs=1M | pv | dd of=VirtualDisk.raw bs=1M
From: https://askubuntu.com/questions/215505/how-do-you-monitor-the-progress-of-dd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment