How do you monitor the progress of dd?












588















dd is a wonder. It lets you duplicate a hard drive to another, completely zero a hard drive, etc. But once you launch a dd command, there's nothing to tell you of its progress. It just sits there at the cursor until the command finally finishes. So how does one monitor dd's progress?










share|improve this question





























    588















    dd is a wonder. It lets you duplicate a hard drive to another, completely zero a hard drive, etc. But once you launch a dd command, there's nothing to tell you of its progress. It just sits there at the cursor until the command finally finishes. So how does one monitor dd's progress?










    share|improve this question



























      588












      588








      588


      264






      dd is a wonder. It lets you duplicate a hard drive to another, completely zero a hard drive, etc. But once you launch a dd command, there's nothing to tell you of its progress. It just sits there at the cursor until the command finally finishes. So how does one monitor dd's progress?










      share|improve this question
















      dd is a wonder. It lets you duplicate a hard drive to another, completely zero a hard drive, etc. But once you launch a dd command, there's nothing to tell you of its progress. It just sits there at the cursor until the command finally finishes. So how does one monitor dd's progress?







      dd monitoring






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Oct 2 '16 at 2:00









      Wolf

      7021719




      7021719










      asked Nov 10 '12 at 20:24









      JamesJames

      9,11951936




      9,11951936






















          20 Answers
          20






          active

          oldest

          votes


















          654














          Update 2016: If you use GNU coreutils >= 8.24 (default in Ubuntu Xenial 16.04 upwards), see method 2 below for an alternate way to display the progress.





          Method 1: By using pv



          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.





          Example Assuming a 2GB disk being copied from /dev/sdb



          Command without pv would be:



          sudo dd if=/dev/sdb of=DriveCopy1.dd bs=4096


          Command with pv:



          sudo dd if=/dev/sdb | pv -s 2G | dd of=DriveCopy1.dd bs=4096


          Output:



          440MB 0:00:38 [11.6MB/s] [======>                             ] 21% ETA 0:02:19




          Other uses



          You can of course use pv directly to pipe the 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.





          Method 2: New status option added to dd (GNU Coreutils 8.24+)



          dd in GNU Coreutils 8.24+ (Ubuntu 16.04 and newer) got a new status option to display the progress:



          Example



          dd if=/dev/urandom of=/dev/null status=progress


          Output



          462858752 bytes (463 MB, 441 MiB) copied, 38 s, 12,2 MB/s





          share|improve this answer





















          • 69





            pv bigfile.iso | dd of=/dev/yourdevice

            – Ion Br.
            Dec 17 '13 at 21:02






          • 18





            Note that the parameters for "dd" are appropriate in the first half (the input part of the pipe): dd if=/dev/zero bs=1M count=35000 | pv | dd of=VirtualDisk.raw.

            – Sopalajo de Arrierez
            Mar 28 '14 at 0:05








          • 6





            pv bigfile.iso | dd of=VirtualDisk.raw bs=1M count=35000 works, verified. @SopalajodeArrierez, parameters can be given in the second dd.

            – SiddharthaRT
            Oct 20 '14 at 12:17






          • 11





            using pv < /dev/sda > /dev/sdb seems to get better speed (source)

            – Nicola Feltrin
            Feb 20 '15 at 13:30








          • 11





            FYI on speed. Tests on my computer with Samsung 840 PRO SSD: dd if=/dev/urandom | pv | of=/dev/sdb gives ~18MB/s write, dd if=/dev/zero | pv | of=/dev/sdb gives ~80MB/s, and plain old dd if=/dev/zero of=/dev/sdb gives ~550MB/s (close to SSD max write speed). All with bs=4096000.

            – Tedd Hansen
            May 7 '16 at 21:18



















          421














          From HowTo: Monitor the progress of dd



          You can monitor the progress of dd without halting it by using the kill command.



          To see the progress of dd once it's running, open another terminal and enter:



          sudo kill -USR1 $(pgrep ^dd)


          This will display dd progress in the dd terminal window without halting the process. If you're on BSD or OS X, use INFO instead of USR1. The USR1 signal will terminate dd.



          If you would like to get regular updates of the dd progress, then enter:



          watch -n5 'sudo kill -USR1 $(pgrep ^dd)'


          watch will probe the dd process every -n seconds (-n5 = 5 seconds) and report without halting it.



          Note the proper single quotes in the commands above.






          share|improve this answer





















          • 18





            This worked, but a couple of comments. First of all, I'm not sure why you escaped your backticks (if it's for the SO editor, you did it incorrectly). Secondly I'd recommend using ^dd$, just in case something else is running with the prefix dd. Finally, you don't need sudo to send the USR1 signal. Otherwise, good answer, +1.

            – gsingh2011
            Jul 14 '13 at 20:25






          • 19





            NB! This way interupts dd work under OSX.

            – Maxim Kholyavkin
            Nov 17 '14 at 6:33






          • 23





            @Speakus You have to use kill -INFO $(pgrep ^dd$) on BSD systems (like OSX).

            – Torben
            Jun 6 '15 at 8:22






          • 18





            sudo pkill -usr1 dd is easier to remember, works perfectly fine (at least on Ubuntu 14.04), and is less to type.

            – Phizes
            Sep 7 '15 at 12:59






          • 13





            I like this because I'm afraid pv will slow down the transfer, as TeddHansen showed it does. Also, I'll bet lots of people are Googling this because they already started the dd operation ;)

            – sudo
            Jul 7 '16 at 18:22





















          95














          A few handy sample usages with pv and less typing or more progress then other answers:



          First you will need to install pv, with the command:



          sudo apt-get install pv


          Then some examples are:



          pv -n /dev/urandom | dd of=/dev/null
          pv -tpreb source.iso | dd of=/dev/BLABLA bs=4096 conv=notrunc,noerror


          Note: the first sample is 5 characters less typing then dd if=/dev/urandom | pv | dd of=/dev/null.



          And my favorite for cloning a disk drive (replace X with drive letters):



          (pv -n /dev/sdX | dd of=/dev/sdX bs=128M conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd command (cloning), please wait..." 10 70 0


          screenshot



          source: http://www.cyberciti.biz/faq/linux-unix-dd-command-show-progress-while-coping/



          Also for archiving myself.






          share|improve this answer





















          • 3





            you will need to install also dialog with the command apt-get install dialog

            – k7k0
            Apr 29 '15 at 19:06






          • 7





            LOVE the dialog example. SERENITY NOW!

            – alex gray
            Nov 22 '15 at 20:47











          • Can you only call that dialog with python?

            – mikeymop
            Apr 29 '16 at 19:50






          • 1





            thanks of this answer, discovered dialog this will insanely help in writing shell scripts :D

            – holms
            Aug 19 '16 at 22:35






          • 2





            brew install pv dialog for Mac. Also this gentleman computes with style. Bravo.

            – evilSnobu
            Apr 5 '18 at 13:18



















          58














          Use Ctrl+Shift+T while dd is running, and it will output the progress (in bytes):



          load: 1.51  cmd: dd 31215 uninterruptible 0.28u 3.67s
          321121+0 records in
          321120+0 records out
          164413440 bytes transferred in 112.708791 secs (1458745 bytes/sec)





          share|improve this answer





















          • 5





            Doesn't work for me on Kubuntu Trusty. Possibly conflicting key bindings?

            – jamadagni
            Nov 15 '14 at 4:33






          • 14





            Great way. It works under OSX, but does not work under ubuntu 14.04

            – Maxim Kholyavkin
            Nov 17 '14 at 6:39






          • 1





            The first line is generated by the OS X, only the latter 3 lines are from dd.

            – Itay Grudev
            Apr 1 '15 at 4:49






          • 3





            You should be able to use kill -INFO on a BSD like OS X

            – macshome
            Sep 19 '15 at 13:07






          • 1





            This doesn't work on Ubuntu. Ctrl-T/Ctrl-Shift-T only output ^T to the terminal (except many terminal apps will intercept Ctrl-Shift-T and open a new tab). Many searchers on OSX/BSD may appreciate this answer, but it should be made clear that it's not for Ubuntu (or GNU/LInux in general?)

            – mwfearnley
            Nov 11 '17 at 16:28



















          49














          For the sake of completeness:



          Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.



          The commit introducing this change has the comment:




          dd: new status=progress level to print stats periodically




          Many distributions, including Ubuntu 16.04.2 LTS use this version.






          share|improve this answer


























          • just wanna add how I've compiled 8.24 coreutils: apt install build-essential and apt-get build-dep coreutils, then download coreutils-8.25.tar.xz, tar xvf coreutils-8.25.tar.xz configure --prefix=$HOME/usr/local and run make. Newly compiled dd will be under src dir. You can copy it to /bin and replace existing one or jus run as src/dd

            – holms
            Aug 19 '16 at 22:37






          • 2





            Cool! I like this feature. And it took just about 30 years to teach dd to print progress output. :-)

            – Johannes Overmann
            Apr 17 '17 at 9:34











          • What a relief! I will immediately add this argument in a dd shell alias.

            – Stephan Henningsen
            May 31 '17 at 20:14













          • Note that the status will sometimes print with two numbers, one in SI units and the equivalent value in binary units (e.g.10 MB, 9.5 MiB).

            – palswim
            Sep 29 '17 at 19:29



















          31














          The best is using http://dcfldd.sourceforge.net/ it is easy to install through apt-get






          share|improve this answer



















          • 3





            thanks for the pointer to dcfldd, very compatible with dd but some good new features. I especially like the standard progress.

            – Floyd
            Dec 20 '13 at 9:46






          • 4





            Why dcfldd isn't more well known is a complete mystery to me.

            – Freedom_Ben
            Mar 3 '14 at 14:00






          • 27





            probably for its name.

            – Giovanni Toraldo
            Dec 28 '14 at 9:31











          • It has the options of dd and option status=on by default, for progress messages, statusinterval=N (N in blocks) for message update frequency and sizeprobe=[if|of] for a percentage indicator. I will alias it to DD :)

            – kavadias
            May 8 '18 at 17:09



















          22














          Native progress status was added to dd!!!



          The new version of Coreutils (8.24) adds a progress status to the dd tool:



          Usage on Xubuntu 15.10:



          Open a terminal and type these commands:



          wget ftp://ftp.gnu.org/pub/gnu/coreutils/coreutils-8.24.tar.xz
          tar -xf coreutils-8.24.tar.xz
          cd coreutils-8.24
          ./configure && make -j $(nproc)


          Run dd as root:



          sudo su
          cd src
          ./dd if=/dev/sdc of=/dev/sda conv=noerror status=progress


          You will see: Bytes, seconds and speed (Bytes/second).



          To check the versions of dd:



          Native:



          dd --version


          New:



          cd coreutils-8.24/src
          ./dd --version





          share|improve this answer

































            16














            If you have already started dd, and if you are writing a file such as when creating a copy of a pendrive to disk, you can use the watch command to constantly observe the size of the output file to see changes and estimate completion.



            watch ls -l /pathtofile/filename


            To see only file size (h-human view):



            watch ls -sh /pathtofile/filename





            share|improve this answer


























            • Also a viable method...

              – hexafraction
              Dec 7 '12 at 21:59






            • 2





              Useful, though this doesn't necessarily work if you're piping the dd output to something other than a file (eg gzip'ing before writing it to disk).

              – Ponkadoodle
              Jul 3 '14 at 3:32











            • Does not work on special files.

              – Johannes Overmann
              Feb 3 '18 at 22:10



















            11














            The dd | pv | dd triad made my 50GB vm copy take 800 seconds, as opposed to 260 seconds using just dd. With this pipeline, at least, pv has no idea how big the input file is so it won't be able to tell you how far along you are so there's no disadvantage to doing it as follows- and you get a nice speed advantage:



            I would avoid pv on anything large, and (if using Bash):



            Control-Z the dd process



            bg to put it in background. Observe that bg will give you output like [1] 6011 where the latter number is a process id. So, do:



            while true; do kill -USR1 process_id ; sleep 5; done



            where process_id is the process id you observed. Hit Control-C when you see something like:



            [1]+  Done dd if=/path/file.qcow2 of=/dev/kvm/pxetest bs=4194304 conv=sparse
            -bash: kill: (60111) - No such process


            You are done.



            Edit: Silly Systems Administrator! Automate your life, don't work! If I have a long dd process that I want to monitor, here's a one-liner that will take care of the whole enchilada for you; put this all on one line:



             dd if=/path/to/bigimage of=/path/to/newimage conv=sparse bs=262144 & bgid=$!; while true; do sleep 1; kill -USR1 $bgid || break; sleep 4; done


            You can, of course, script it, perhaps make $1 your input file and $2 your output file. This is left as an exercise for the reader. Note that you need that little sleep before the kill or the kill may die trying to send a signal to dd when it's not ready yet. Adjust your sleeps as desired (maybe even remove the second sleep altogether).



            Bash- FTW! :-)






            share|improve this answer


























            • Compress the while loop. Use watch.

              – muru
              May 7 '15 at 15:00






            • 1





              @muru it depends. I don't know about your system but on CentOS7* the output is a little garbled; it's readable but does not look orderly. Also it stomps over your previous output so you lose history of the speed of your dd; mine varies between 20 MB/s and 300 MB/s. It's interesting to watch the numbers vary and instructive too. I think some of the large variance is due to LVM thin pools increasing the allocation for an LV I'm writing to. * yes this is an ubuntu forum but I got here looking for "dd monitor progress". It's the first result on Google.

              – Mike S
              May 7 '15 at 17:51













            • Oh, I meant in another terminal or screen window, run sudo watch pkill dd. Then watch dd output the stats comfortably.

              – muru
              May 7 '15 at 18:02











            • Won't pkill send SIGTERM by default? I don't even want to experiment, as pgrep dd comes up with 3 pid's when running a single dd: kthreadd, oddjob, and the dd. I'm afraid of what pkill will do. You could send the -USR1 signal with pkill but again I don't know if that's safe to send to the kernel thread or to obbjob. The watch command looks cleaner but it seems like a lot of extra steps just to avoid a while loop. Generally if I'm doing a dd in one window I'm going to do something right afterwards in the same shell. The while loop is safe: you know EXACTLY which pid gets the signal.

              – Mike S
              May 8 '15 at 14:01











            • mostly I don't care which pids get the signal, since I use watch pkill -USR1 -x dd. Since I also use watch for other similar tasks, this one comes naturally.

              – muru
              May 8 '15 at 14:07



















            10














            http://linuxcommando.blogspot.com/2008/06/show-progress-during-dd-copy.html



            Basically:



            kill -USR1 < dd pid >





            share|improve this answer





















            • 1





              "pkill -USR1 dd" is the simplest version I'm aware of (as long as you're just running one instance of dd, anyway). On my system I need sudo: "sudo pkill -USR1 dd". Works after you've typed the dd command, and you don't need to install anything new.

              – Fred Hamilton
              May 18 '15 at 18:49





















            6














            On Ubuntu 16.04



            Ubuntu 16.04 comes with dd (coreutils) Version 8.25 . Hence the option status=progress is Supported :-)



            To use it, just add status=progress along with your dd command.



            Example :



            dd bs=4M if=/media/severus/tools-soft/OperatingSystems/ubuntu-16.04-desktop-amd64.iso of=/dev/null status=progress && sync


            Gives the status as



            1282846183 bytes (1.2 GiB, 1.1 GiB) copied, 14.03 s, 101.9 MB/s


            enter image description here






            share|improve this answer































              6














              Easiest is:



               dd if=... of=... bs=4M status=progress oflag=dsync


              oflag=dsync will keep your writing in sync, so information of status=progress is more accurate. However it might be a bit slower.






              share|improve this answer



















              • 1





                according to gnu.org/software/coreutils/manual/html_node/dd-invocation.html , using conv=fsync is better

                – Chen Deng-Ta
                Jun 24 '17 at 12:49













              • Thanks for this! I'm doing dd to a remote lvm2 and the bs=4M increased my transfer by a factor of 20 and the progress indication is wonderful.

                – Lonnie Best
                Jan 19 '18 at 8:26



















              4














              I really like ddrescue, it works as dd but gives output and doesn't fail on errors, on the contrary it has a very advanced algorithm an tries really hard to do a successful copy... There are also many GUIs for it



              Project: https://www.gnu.org/software/ddrescue



              Wikipedia: https://en.wikipedia.org/wiki/Ddrescue



              enter image description here






              share|improve this answer































                3














                I have created bash wrapper over dd that will use pv to show progress. Put it into your .bashrc and use dd as usual:



                # dd if=/dev/vvg0/root of=/dev/vvg1/root bs=4M
                2GB 0:00:17 [ 120MB/s] [===========================================================>] 100%
                0+16384 records in
                0+16384 records out
                2147483648 bytes (2.1 GB) copied, 18.3353 s, 117 MB/s


                Source:



                dd()
                {
                local dd=$(which dd); [ "$dd" ] || {
                echo "'dd' is not installed!" >&2
                return 1
                }

                local pv=$(which pv); [ "$pv" ] || {
                echo "'pv' is not installed!" >&2
                "$dd" "$@"
                return $?
                }

                local arg arg2 infile
                local -a args
                for arg in "$@"
                do
                arg2=${arg#if=}
                if [ "$arg2" != "$arg" ]
                then
                infile=$arg2
                else
                args[${#args[@]}]=$arg
                fi
                done

                "$pv" -tpreb "$infile" | "$dd" "${args[@]}"
                }





                share|improve this answer


























                • Good way but it does not work with commands like sudo or time.

                  – Maxim Kholyavkin
                  Nov 17 '14 at 7:28






                • 1





                  Put it into /usr/local/bin/dd with this on top: #!/bin/bash. On bottom: tmp=":${PATH}:"; tmp=${tmp/:/usr/local/bin:/:}; tmp=${tmp%:}; PATH=${tmp#:}; dd "$@" Or you may wish to hardcode dd location. Then use local dd=/usr/bin/dd. Don't forget to add executable bit: chmod +x /usr/local/dd.

                  – midenok
                  Nov 19 '14 at 7:06





















                3














                Use option status=progress to get the progress during the transfert.



                In addition, conv=fsync will display I/O errors.



                Example:



                sudo dd if=mydistrib.iso of=/dev/sdb status=progress conv=fsync





                share|improve this answer































                  2














                  So today I got a little frustrated with trying to run kill in a loop while dd was running, and came up with this method for running them in parallel, easily:



                  function vdd {
                  sudo dd "$@" &
                  sudo sh -c "while pkill -10 ^dd$; do sleep 5; done"
                  }


                  Now just use vdd anywhere you'd normally use dd (it passes all arguments directly through) and you'll get a progress report printed every 5s.



                  The only downside is that the command doesn't return immediately when dd completes; so it's possible that this command can keep you waiting an extra 5s after dd returns before it notices and exits.






                  share|improve this answer































                    2














                    This one forces dd to provide stats every 2 seconds which is default for watch:



                    watch killall -USR1 dd


                    To change from every 2 seconds to every 5 seconds, add -n 5 option like this:



                    watch -n 5 killall -USR1 dd





                    share|improve this answer

































                      1














                      As mentioned above, at least with the 'dd' from GNU coreutils, or busybox, it will respond to a USR1 signal by printing progress info to stderr.



                      I wrote a little wrapper script for dd that shows a nice percent-complete indicator, and tries to not interfere with dd's process or way of functioning in any way. You can find it on github:



                      http://github.com/delt01/dd_printpercent



                      Unfortunately, this SIGUSR1 trick only works with either GNU dd (from the coreutils package) or busybox's 'dd' mode with that specific feature enabled at compile time. It doesn't work with the stock 'dd' included with most BSD systems, including FreeBSD and OS X ... :(






                      share|improve this answer































                        1














                        You can watch the progress of any coreutils program using progress - Coreutils Progress Viewer.



                        It can monitor:



                        cp mv dd tar cat rsync grep fgrep egrep cut sort md5sum sha1sum sha224sum sha256sum sha384sum sha512sum adb gzip gunzip bzip2 bunzip2 xz unxz lzma unlzma 7z 7za zcat bzcat lzcat split gpg



                        You can see the manpage



                        You can use it in a seperate terminal window while the command is running or launch it with the dd command:



                        dd if=/dev/sda of=file.img & progress -mp $!


                        Here & forks the first command and continues immediately instead of waiting until the command ends.



                        The progress command is launched with: -m so it waits until the monitored process ended, -p so it monitors a given pid and $! is the last command pid.



                        If you issue dd with sudo, you have to too with progress too:



                        sudo dd if=/dev/sda of=file.img &
                        sudo progress -m
                        # with no -p, this will wait for all coreutil commands to finish
                        # but $! will give the sudo command's pid





                        share|improve this answer































                          1














                          Just in case anybody from CentOS land happens to find this thread...



                          The 'status=progress' option works with CentOS 7.5 and 7.6



                          The answer above by @davidDavidson implies the feature was newly added in Coreutils 8.24.




                          Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.




                          This may be the case, but CentOS might not be following the same versioning scheme.



                          The version of Coreutils that comes with CentOS 7.6.1810 is:



                          coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts


                          And the version of dd that is installed is:



                          [root@hostname /]# dd --version
                          dd (coreutils) 8.22
                          Copyright (C) 2013 Free Software Foundation, Inc.
                          License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
                          This is free software: you are free to change and redistribute it.
                          There is NO WARRANTY, to the extent permitted by law.

                          Written by Paul Rubin, David MacKenzie, and Stuart Kemp.


                          This shows versions 8.22.



                          However, I have tested the 'status=progress' with dd on both CentOS 7.5 and CentOS 7.6 (both with version 8.22 of Coreutils) and it functions properly.



                          I don't know why RedHat chooses to use such an old version of Coreutils but the functionality does exist with 8.22.






                          share|improve this answer






















                            protected by Community Mar 13 '17 at 5:43



                            Thank you for your interest in this question.
                            Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                            Would you like to answer one of these unanswered questions instead?














                            20 Answers
                            20






                            active

                            oldest

                            votes








                            20 Answers
                            20






                            active

                            oldest

                            votes









                            active

                            oldest

                            votes






                            active

                            oldest

                            votes









                            654














                            Update 2016: If you use GNU coreutils >= 8.24 (default in Ubuntu Xenial 16.04 upwards), see method 2 below for an alternate way to display the progress.





                            Method 1: By using pv



                            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.





                            Example Assuming a 2GB disk being copied from /dev/sdb



                            Command without pv would be:



                            sudo dd if=/dev/sdb of=DriveCopy1.dd bs=4096


                            Command with pv:



                            sudo dd if=/dev/sdb | pv -s 2G | dd of=DriveCopy1.dd bs=4096


                            Output:



                            440MB 0:00:38 [11.6MB/s] [======>                             ] 21% ETA 0:02:19




                            Other uses



                            You can of course use pv directly to pipe the 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.





                            Method 2: New status option added to dd (GNU Coreutils 8.24+)



                            dd in GNU Coreutils 8.24+ (Ubuntu 16.04 and newer) got a new status option to display the progress:



                            Example



                            dd if=/dev/urandom of=/dev/null status=progress


                            Output



                            462858752 bytes (463 MB, 441 MiB) copied, 38 s, 12,2 MB/s





                            share|improve this answer





















                            • 69





                              pv bigfile.iso | dd of=/dev/yourdevice

                              – Ion Br.
                              Dec 17 '13 at 21:02






                            • 18





                              Note that the parameters for "dd" are appropriate in the first half (the input part of the pipe): dd if=/dev/zero bs=1M count=35000 | pv | dd of=VirtualDisk.raw.

                              – Sopalajo de Arrierez
                              Mar 28 '14 at 0:05








                            • 6





                              pv bigfile.iso | dd of=VirtualDisk.raw bs=1M count=35000 works, verified. @SopalajodeArrierez, parameters can be given in the second dd.

                              – SiddharthaRT
                              Oct 20 '14 at 12:17






                            • 11





                              using pv < /dev/sda > /dev/sdb seems to get better speed (source)

                              – Nicola Feltrin
                              Feb 20 '15 at 13:30








                            • 11





                              FYI on speed. Tests on my computer with Samsung 840 PRO SSD: dd if=/dev/urandom | pv | of=/dev/sdb gives ~18MB/s write, dd if=/dev/zero | pv | of=/dev/sdb gives ~80MB/s, and plain old dd if=/dev/zero of=/dev/sdb gives ~550MB/s (close to SSD max write speed). All with bs=4096000.

                              – Tedd Hansen
                              May 7 '16 at 21:18
















                            654














                            Update 2016: If you use GNU coreutils >= 8.24 (default in Ubuntu Xenial 16.04 upwards), see method 2 below for an alternate way to display the progress.





                            Method 1: By using pv



                            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.





                            Example Assuming a 2GB disk being copied from /dev/sdb



                            Command without pv would be:



                            sudo dd if=/dev/sdb of=DriveCopy1.dd bs=4096


                            Command with pv:



                            sudo dd if=/dev/sdb | pv -s 2G | dd of=DriveCopy1.dd bs=4096


                            Output:



                            440MB 0:00:38 [11.6MB/s] [======>                             ] 21% ETA 0:02:19




                            Other uses



                            You can of course use pv directly to pipe the 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.





                            Method 2: New status option added to dd (GNU Coreutils 8.24+)



                            dd in GNU Coreutils 8.24+ (Ubuntu 16.04 and newer) got a new status option to display the progress:



                            Example



                            dd if=/dev/urandom of=/dev/null status=progress


                            Output



                            462858752 bytes (463 MB, 441 MiB) copied, 38 s, 12,2 MB/s





                            share|improve this answer





















                            • 69





                              pv bigfile.iso | dd of=/dev/yourdevice

                              – Ion Br.
                              Dec 17 '13 at 21:02






                            • 18





                              Note that the parameters for "dd" are appropriate in the first half (the input part of the pipe): dd if=/dev/zero bs=1M count=35000 | pv | dd of=VirtualDisk.raw.

                              – Sopalajo de Arrierez
                              Mar 28 '14 at 0:05








                            • 6





                              pv bigfile.iso | dd of=VirtualDisk.raw bs=1M count=35000 works, verified. @SopalajodeArrierez, parameters can be given in the second dd.

                              – SiddharthaRT
                              Oct 20 '14 at 12:17






                            • 11





                              using pv < /dev/sda > /dev/sdb seems to get better speed (source)

                              – Nicola Feltrin
                              Feb 20 '15 at 13:30








                            • 11





                              FYI on speed. Tests on my computer with Samsung 840 PRO SSD: dd if=/dev/urandom | pv | of=/dev/sdb gives ~18MB/s write, dd if=/dev/zero | pv | of=/dev/sdb gives ~80MB/s, and plain old dd if=/dev/zero of=/dev/sdb gives ~550MB/s (close to SSD max write speed). All with bs=4096000.

                              – Tedd Hansen
                              May 7 '16 at 21:18














                            654












                            654








                            654







                            Update 2016: If you use GNU coreutils >= 8.24 (default in Ubuntu Xenial 16.04 upwards), see method 2 below for an alternate way to display the progress.





                            Method 1: By using pv



                            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.





                            Example Assuming a 2GB disk being copied from /dev/sdb



                            Command without pv would be:



                            sudo dd if=/dev/sdb of=DriveCopy1.dd bs=4096


                            Command with pv:



                            sudo dd if=/dev/sdb | pv -s 2G | dd of=DriveCopy1.dd bs=4096


                            Output:



                            440MB 0:00:38 [11.6MB/s] [======>                             ] 21% ETA 0:02:19




                            Other uses



                            You can of course use pv directly to pipe the 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.





                            Method 2: New status option added to dd (GNU Coreutils 8.24+)



                            dd in GNU Coreutils 8.24+ (Ubuntu 16.04 and newer) got a new status option to display the progress:



                            Example



                            dd if=/dev/urandom of=/dev/null status=progress


                            Output



                            462858752 bytes (463 MB, 441 MiB) copied, 38 s, 12,2 MB/s





                            share|improve this answer















                            Update 2016: If you use GNU coreutils >= 8.24 (default in Ubuntu Xenial 16.04 upwards), see method 2 below for an alternate way to display the progress.





                            Method 1: By using pv



                            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.





                            Example Assuming a 2GB disk being copied from /dev/sdb



                            Command without pv would be:



                            sudo dd if=/dev/sdb of=DriveCopy1.dd bs=4096


                            Command with pv:



                            sudo dd if=/dev/sdb | pv -s 2G | dd of=DriveCopy1.dd bs=4096


                            Output:



                            440MB 0:00:38 [11.6MB/s] [======>                             ] 21% ETA 0:02:19




                            Other uses



                            You can of course use pv directly to pipe the 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.





                            Method 2: New status option added to dd (GNU Coreutils 8.24+)



                            dd in GNU Coreutils 8.24+ (Ubuntu 16.04 and newer) got a new status option to display the progress:



                            Example



                            dd if=/dev/urandom of=/dev/null status=progress


                            Output



                            462858752 bytes (463 MB, 441 MiB) copied, 38 s, 12,2 MB/s






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited May 21 '16 at 2:24









                            muru

                            1




                            1










                            answered Nov 11 '12 at 2:04









                            phoibosphoibos

                            15.5k23744




                            15.5k23744








                            • 69





                              pv bigfile.iso | dd of=/dev/yourdevice

                              – Ion Br.
                              Dec 17 '13 at 21:02






                            • 18





                              Note that the parameters for "dd" are appropriate in the first half (the input part of the pipe): dd if=/dev/zero bs=1M count=35000 | pv | dd of=VirtualDisk.raw.

                              – Sopalajo de Arrierez
                              Mar 28 '14 at 0:05








                            • 6





                              pv bigfile.iso | dd of=VirtualDisk.raw bs=1M count=35000 works, verified. @SopalajodeArrierez, parameters can be given in the second dd.

                              – SiddharthaRT
                              Oct 20 '14 at 12:17






                            • 11





                              using pv < /dev/sda > /dev/sdb seems to get better speed (source)

                              – Nicola Feltrin
                              Feb 20 '15 at 13:30








                            • 11





                              FYI on speed. Tests on my computer with Samsung 840 PRO SSD: dd if=/dev/urandom | pv | of=/dev/sdb gives ~18MB/s write, dd if=/dev/zero | pv | of=/dev/sdb gives ~80MB/s, and plain old dd if=/dev/zero of=/dev/sdb gives ~550MB/s (close to SSD max write speed). All with bs=4096000.

                              – Tedd Hansen
                              May 7 '16 at 21:18














                            • 69





                              pv bigfile.iso | dd of=/dev/yourdevice

                              – Ion Br.
                              Dec 17 '13 at 21:02






                            • 18





                              Note that the parameters for "dd" are appropriate in the first half (the input part of the pipe): dd if=/dev/zero bs=1M count=35000 | pv | dd of=VirtualDisk.raw.

                              – Sopalajo de Arrierez
                              Mar 28 '14 at 0:05








                            • 6





                              pv bigfile.iso | dd of=VirtualDisk.raw bs=1M count=35000 works, verified. @SopalajodeArrierez, parameters can be given in the second dd.

                              – SiddharthaRT
                              Oct 20 '14 at 12:17






                            • 11





                              using pv < /dev/sda > /dev/sdb seems to get better speed (source)

                              – Nicola Feltrin
                              Feb 20 '15 at 13:30








                            • 11





                              FYI on speed. Tests on my computer with Samsung 840 PRO SSD: dd if=/dev/urandom | pv | of=/dev/sdb gives ~18MB/s write, dd if=/dev/zero | pv | of=/dev/sdb gives ~80MB/s, and plain old dd if=/dev/zero of=/dev/sdb gives ~550MB/s (close to SSD max write speed). All with bs=4096000.

                              – Tedd Hansen
                              May 7 '16 at 21:18








                            69




                            69





                            pv bigfile.iso | dd of=/dev/yourdevice

                            – Ion Br.
                            Dec 17 '13 at 21:02





                            pv bigfile.iso | dd of=/dev/yourdevice

                            – Ion Br.
                            Dec 17 '13 at 21:02




                            18




                            18





                            Note that the parameters for "dd" are appropriate in the first half (the input part of the pipe): dd if=/dev/zero bs=1M count=35000 | pv | dd of=VirtualDisk.raw.

                            – Sopalajo de Arrierez
                            Mar 28 '14 at 0:05







                            Note that the parameters for "dd" are appropriate in the first half (the input part of the pipe): dd if=/dev/zero bs=1M count=35000 | pv | dd of=VirtualDisk.raw.

                            – Sopalajo de Arrierez
                            Mar 28 '14 at 0:05






                            6




                            6





                            pv bigfile.iso | dd of=VirtualDisk.raw bs=1M count=35000 works, verified. @SopalajodeArrierez, parameters can be given in the second dd.

                            – SiddharthaRT
                            Oct 20 '14 at 12:17





                            pv bigfile.iso | dd of=VirtualDisk.raw bs=1M count=35000 works, verified. @SopalajodeArrierez, parameters can be given in the second dd.

                            – SiddharthaRT
                            Oct 20 '14 at 12:17




                            11




                            11





                            using pv < /dev/sda > /dev/sdb seems to get better speed (source)

                            – Nicola Feltrin
                            Feb 20 '15 at 13:30







                            using pv < /dev/sda > /dev/sdb seems to get better speed (source)

                            – Nicola Feltrin
                            Feb 20 '15 at 13:30






                            11




                            11





                            FYI on speed. Tests on my computer with Samsung 840 PRO SSD: dd if=/dev/urandom | pv | of=/dev/sdb gives ~18MB/s write, dd if=/dev/zero | pv | of=/dev/sdb gives ~80MB/s, and plain old dd if=/dev/zero of=/dev/sdb gives ~550MB/s (close to SSD max write speed). All with bs=4096000.

                            – Tedd Hansen
                            May 7 '16 at 21:18





                            FYI on speed. Tests on my computer with Samsung 840 PRO SSD: dd if=/dev/urandom | pv | of=/dev/sdb gives ~18MB/s write, dd if=/dev/zero | pv | of=/dev/sdb gives ~80MB/s, and plain old dd if=/dev/zero of=/dev/sdb gives ~550MB/s (close to SSD max write speed). All with bs=4096000.

                            – Tedd Hansen
                            May 7 '16 at 21:18













                            421














                            From HowTo: Monitor the progress of dd



                            You can monitor the progress of dd without halting it by using the kill command.



                            To see the progress of dd once it's running, open another terminal and enter:



                            sudo kill -USR1 $(pgrep ^dd)


                            This will display dd progress in the dd terminal window without halting the process. If you're on BSD or OS X, use INFO instead of USR1. The USR1 signal will terminate dd.



                            If you would like to get regular updates of the dd progress, then enter:



                            watch -n5 'sudo kill -USR1 $(pgrep ^dd)'


                            watch will probe the dd process every -n seconds (-n5 = 5 seconds) and report without halting it.



                            Note the proper single quotes in the commands above.






                            share|improve this answer





















                            • 18





                              This worked, but a couple of comments. First of all, I'm not sure why you escaped your backticks (if it's for the SO editor, you did it incorrectly). Secondly I'd recommend using ^dd$, just in case something else is running with the prefix dd. Finally, you don't need sudo to send the USR1 signal. Otherwise, good answer, +1.

                              – gsingh2011
                              Jul 14 '13 at 20:25






                            • 19





                              NB! This way interupts dd work under OSX.

                              – Maxim Kholyavkin
                              Nov 17 '14 at 6:33






                            • 23





                              @Speakus You have to use kill -INFO $(pgrep ^dd$) on BSD systems (like OSX).

                              – Torben
                              Jun 6 '15 at 8:22






                            • 18





                              sudo pkill -usr1 dd is easier to remember, works perfectly fine (at least on Ubuntu 14.04), and is less to type.

                              – Phizes
                              Sep 7 '15 at 12:59






                            • 13





                              I like this because I'm afraid pv will slow down the transfer, as TeddHansen showed it does. Also, I'll bet lots of people are Googling this because they already started the dd operation ;)

                              – sudo
                              Jul 7 '16 at 18:22


















                            421














                            From HowTo: Monitor the progress of dd



                            You can monitor the progress of dd without halting it by using the kill command.



                            To see the progress of dd once it's running, open another terminal and enter:



                            sudo kill -USR1 $(pgrep ^dd)


                            This will display dd progress in the dd terminal window without halting the process. If you're on BSD or OS X, use INFO instead of USR1. The USR1 signal will terminate dd.



                            If you would like to get regular updates of the dd progress, then enter:



                            watch -n5 'sudo kill -USR1 $(pgrep ^dd)'


                            watch will probe the dd process every -n seconds (-n5 = 5 seconds) and report without halting it.



                            Note the proper single quotes in the commands above.






                            share|improve this answer





















                            • 18





                              This worked, but a couple of comments. First of all, I'm not sure why you escaped your backticks (if it's for the SO editor, you did it incorrectly). Secondly I'd recommend using ^dd$, just in case something else is running with the prefix dd. Finally, you don't need sudo to send the USR1 signal. Otherwise, good answer, +1.

                              – gsingh2011
                              Jul 14 '13 at 20:25






                            • 19





                              NB! This way interupts dd work under OSX.

                              – Maxim Kholyavkin
                              Nov 17 '14 at 6:33






                            • 23





                              @Speakus You have to use kill -INFO $(pgrep ^dd$) on BSD systems (like OSX).

                              – Torben
                              Jun 6 '15 at 8:22






                            • 18





                              sudo pkill -usr1 dd is easier to remember, works perfectly fine (at least on Ubuntu 14.04), and is less to type.

                              – Phizes
                              Sep 7 '15 at 12:59






                            • 13





                              I like this because I'm afraid pv will slow down the transfer, as TeddHansen showed it does. Also, I'll bet lots of people are Googling this because they already started the dd operation ;)

                              – sudo
                              Jul 7 '16 at 18:22
















                            421












                            421








                            421







                            From HowTo: Monitor the progress of dd



                            You can monitor the progress of dd without halting it by using the kill command.



                            To see the progress of dd once it's running, open another terminal and enter:



                            sudo kill -USR1 $(pgrep ^dd)


                            This will display dd progress in the dd terminal window without halting the process. If you're on BSD or OS X, use INFO instead of USR1. The USR1 signal will terminate dd.



                            If you would like to get regular updates of the dd progress, then enter:



                            watch -n5 'sudo kill -USR1 $(pgrep ^dd)'


                            watch will probe the dd process every -n seconds (-n5 = 5 seconds) and report without halting it.



                            Note the proper single quotes in the commands above.






                            share|improve this answer















                            From HowTo: Monitor the progress of dd



                            You can monitor the progress of dd without halting it by using the kill command.



                            To see the progress of dd once it's running, open another terminal and enter:



                            sudo kill -USR1 $(pgrep ^dd)


                            This will display dd progress in the dd terminal window without halting the process. If you're on BSD or OS X, use INFO instead of USR1. The USR1 signal will terminate dd.



                            If you would like to get regular updates of the dd progress, then enter:



                            watch -n5 'sudo kill -USR1 $(pgrep ^dd)'


                            watch will probe the dd process every -n seconds (-n5 = 5 seconds) and report without halting it.



                            Note the proper single quotes in the commands above.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited May 8 '16 at 6:45









                            swift

                            2,96621743




                            2,96621743










                            answered Nov 10 '12 at 20:44









                            JamesJames

                            9,11951936




                            9,11951936








                            • 18





                              This worked, but a couple of comments. First of all, I'm not sure why you escaped your backticks (if it's for the SO editor, you did it incorrectly). Secondly I'd recommend using ^dd$, just in case something else is running with the prefix dd. Finally, you don't need sudo to send the USR1 signal. Otherwise, good answer, +1.

                              – gsingh2011
                              Jul 14 '13 at 20:25






                            • 19





                              NB! This way interupts dd work under OSX.

                              – Maxim Kholyavkin
                              Nov 17 '14 at 6:33






                            • 23





                              @Speakus You have to use kill -INFO $(pgrep ^dd$) on BSD systems (like OSX).

                              – Torben
                              Jun 6 '15 at 8:22






                            • 18





                              sudo pkill -usr1 dd is easier to remember, works perfectly fine (at least on Ubuntu 14.04), and is less to type.

                              – Phizes
                              Sep 7 '15 at 12:59






                            • 13





                              I like this because I'm afraid pv will slow down the transfer, as TeddHansen showed it does. Also, I'll bet lots of people are Googling this because they already started the dd operation ;)

                              – sudo
                              Jul 7 '16 at 18:22
















                            • 18





                              This worked, but a couple of comments. First of all, I'm not sure why you escaped your backticks (if it's for the SO editor, you did it incorrectly). Secondly I'd recommend using ^dd$, just in case something else is running with the prefix dd. Finally, you don't need sudo to send the USR1 signal. Otherwise, good answer, +1.

                              – gsingh2011
                              Jul 14 '13 at 20:25






                            • 19





                              NB! This way interupts dd work under OSX.

                              – Maxim Kholyavkin
                              Nov 17 '14 at 6:33






                            • 23





                              @Speakus You have to use kill -INFO $(pgrep ^dd$) on BSD systems (like OSX).

                              – Torben
                              Jun 6 '15 at 8:22






                            • 18





                              sudo pkill -usr1 dd is easier to remember, works perfectly fine (at least on Ubuntu 14.04), and is less to type.

                              – Phizes
                              Sep 7 '15 at 12:59






                            • 13





                              I like this because I'm afraid pv will slow down the transfer, as TeddHansen showed it does. Also, I'll bet lots of people are Googling this because they already started the dd operation ;)

                              – sudo
                              Jul 7 '16 at 18:22










                            18




                            18





                            This worked, but a couple of comments. First of all, I'm not sure why you escaped your backticks (if it's for the SO editor, you did it incorrectly). Secondly I'd recommend using ^dd$, just in case something else is running with the prefix dd. Finally, you don't need sudo to send the USR1 signal. Otherwise, good answer, +1.

                            – gsingh2011
                            Jul 14 '13 at 20:25





                            This worked, but a couple of comments. First of all, I'm not sure why you escaped your backticks (if it's for the SO editor, you did it incorrectly). Secondly I'd recommend using ^dd$, just in case something else is running with the prefix dd. Finally, you don't need sudo to send the USR1 signal. Otherwise, good answer, +1.

                            – gsingh2011
                            Jul 14 '13 at 20:25




                            19




                            19





                            NB! This way interupts dd work under OSX.

                            – Maxim Kholyavkin
                            Nov 17 '14 at 6:33





                            NB! This way interupts dd work under OSX.

                            – Maxim Kholyavkin
                            Nov 17 '14 at 6:33




                            23




                            23





                            @Speakus You have to use kill -INFO $(pgrep ^dd$) on BSD systems (like OSX).

                            – Torben
                            Jun 6 '15 at 8:22





                            @Speakus You have to use kill -INFO $(pgrep ^dd$) on BSD systems (like OSX).

                            – Torben
                            Jun 6 '15 at 8:22




                            18




                            18





                            sudo pkill -usr1 dd is easier to remember, works perfectly fine (at least on Ubuntu 14.04), and is less to type.

                            – Phizes
                            Sep 7 '15 at 12:59





                            sudo pkill -usr1 dd is easier to remember, works perfectly fine (at least on Ubuntu 14.04), and is less to type.

                            – Phizes
                            Sep 7 '15 at 12:59




                            13




                            13





                            I like this because I'm afraid pv will slow down the transfer, as TeddHansen showed it does. Also, I'll bet lots of people are Googling this because they already started the dd operation ;)

                            – sudo
                            Jul 7 '16 at 18:22







                            I like this because I'm afraid pv will slow down the transfer, as TeddHansen showed it does. Also, I'll bet lots of people are Googling this because they already started the dd operation ;)

                            – sudo
                            Jul 7 '16 at 18:22













                            95














                            A few handy sample usages with pv and less typing or more progress then other answers:



                            First you will need to install pv, with the command:



                            sudo apt-get install pv


                            Then some examples are:



                            pv -n /dev/urandom | dd of=/dev/null
                            pv -tpreb source.iso | dd of=/dev/BLABLA bs=4096 conv=notrunc,noerror


                            Note: the first sample is 5 characters less typing then dd if=/dev/urandom | pv | dd of=/dev/null.



                            And my favorite for cloning a disk drive (replace X with drive letters):



                            (pv -n /dev/sdX | dd of=/dev/sdX bs=128M conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd command (cloning), please wait..." 10 70 0


                            screenshot



                            source: http://www.cyberciti.biz/faq/linux-unix-dd-command-show-progress-while-coping/



                            Also for archiving myself.






                            share|improve this answer





















                            • 3





                              you will need to install also dialog with the command apt-get install dialog

                              – k7k0
                              Apr 29 '15 at 19:06






                            • 7





                              LOVE the dialog example. SERENITY NOW!

                              – alex gray
                              Nov 22 '15 at 20:47











                            • Can you only call that dialog with python?

                              – mikeymop
                              Apr 29 '16 at 19:50






                            • 1





                              thanks of this answer, discovered dialog this will insanely help in writing shell scripts :D

                              – holms
                              Aug 19 '16 at 22:35






                            • 2





                              brew install pv dialog for Mac. Also this gentleman computes with style. Bravo.

                              – evilSnobu
                              Apr 5 '18 at 13:18
















                            95














                            A few handy sample usages with pv and less typing or more progress then other answers:



                            First you will need to install pv, with the command:



                            sudo apt-get install pv


                            Then some examples are:



                            pv -n /dev/urandom | dd of=/dev/null
                            pv -tpreb source.iso | dd of=/dev/BLABLA bs=4096 conv=notrunc,noerror


                            Note: the first sample is 5 characters less typing then dd if=/dev/urandom | pv | dd of=/dev/null.



                            And my favorite for cloning a disk drive (replace X with drive letters):



                            (pv -n /dev/sdX | dd of=/dev/sdX bs=128M conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd command (cloning), please wait..." 10 70 0


                            screenshot



                            source: http://www.cyberciti.biz/faq/linux-unix-dd-command-show-progress-while-coping/



                            Also for archiving myself.






                            share|improve this answer





















                            • 3





                              you will need to install also dialog with the command apt-get install dialog

                              – k7k0
                              Apr 29 '15 at 19:06






                            • 7





                              LOVE the dialog example. SERENITY NOW!

                              – alex gray
                              Nov 22 '15 at 20:47











                            • Can you only call that dialog with python?

                              – mikeymop
                              Apr 29 '16 at 19:50






                            • 1





                              thanks of this answer, discovered dialog this will insanely help in writing shell scripts :D

                              – holms
                              Aug 19 '16 at 22:35






                            • 2





                              brew install pv dialog for Mac. Also this gentleman computes with style. Bravo.

                              – evilSnobu
                              Apr 5 '18 at 13:18














                            95












                            95








                            95







                            A few handy sample usages with pv and less typing or more progress then other answers:



                            First you will need to install pv, with the command:



                            sudo apt-get install pv


                            Then some examples are:



                            pv -n /dev/urandom | dd of=/dev/null
                            pv -tpreb source.iso | dd of=/dev/BLABLA bs=4096 conv=notrunc,noerror


                            Note: the first sample is 5 characters less typing then dd if=/dev/urandom | pv | dd of=/dev/null.



                            And my favorite for cloning a disk drive (replace X with drive letters):



                            (pv -n /dev/sdX | dd of=/dev/sdX bs=128M conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd command (cloning), please wait..." 10 70 0


                            screenshot



                            source: http://www.cyberciti.biz/faq/linux-unix-dd-command-show-progress-while-coping/



                            Also for archiving myself.






                            share|improve this answer















                            A few handy sample usages with pv and less typing or more progress then other answers:



                            First you will need to install pv, with the command:



                            sudo apt-get install pv


                            Then some examples are:



                            pv -n /dev/urandom | dd of=/dev/null
                            pv -tpreb source.iso | dd of=/dev/BLABLA bs=4096 conv=notrunc,noerror


                            Note: the first sample is 5 characters less typing then dd if=/dev/urandom | pv | dd of=/dev/null.



                            And my favorite for cloning a disk drive (replace X with drive letters):



                            (pv -n /dev/sdX | dd of=/dev/sdX bs=128M conv=notrunc,noerror) 2>&1 | dialog --gauge "Running dd command (cloning), please wait..." 10 70 0


                            screenshot



                            source: http://www.cyberciti.biz/faq/linux-unix-dd-command-show-progress-while-coping/



                            Also for archiving myself.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited 13 mins ago









                            MattPark

                            1033




                            1033










                            answered Aug 27 '14 at 14:01









                            JSBachJSBach

                            1,11578




                            1,11578








                            • 3





                              you will need to install also dialog with the command apt-get install dialog

                              – k7k0
                              Apr 29 '15 at 19:06






                            • 7





                              LOVE the dialog example. SERENITY NOW!

                              – alex gray
                              Nov 22 '15 at 20:47











                            • Can you only call that dialog with python?

                              – mikeymop
                              Apr 29 '16 at 19:50






                            • 1





                              thanks of this answer, discovered dialog this will insanely help in writing shell scripts :D

                              – holms
                              Aug 19 '16 at 22:35






                            • 2





                              brew install pv dialog for Mac. Also this gentleman computes with style. Bravo.

                              – evilSnobu
                              Apr 5 '18 at 13:18














                            • 3





                              you will need to install also dialog with the command apt-get install dialog

                              – k7k0
                              Apr 29 '15 at 19:06






                            • 7





                              LOVE the dialog example. SERENITY NOW!

                              – alex gray
                              Nov 22 '15 at 20:47











                            • Can you only call that dialog with python?

                              – mikeymop
                              Apr 29 '16 at 19:50






                            • 1





                              thanks of this answer, discovered dialog this will insanely help in writing shell scripts :D

                              – holms
                              Aug 19 '16 at 22:35






                            • 2





                              brew install pv dialog for Mac. Also this gentleman computes with style. Bravo.

                              – evilSnobu
                              Apr 5 '18 at 13:18








                            3




                            3





                            you will need to install also dialog with the command apt-get install dialog

                            – k7k0
                            Apr 29 '15 at 19:06





                            you will need to install also dialog with the command apt-get install dialog

                            – k7k0
                            Apr 29 '15 at 19:06




                            7




                            7





                            LOVE the dialog example. SERENITY NOW!

                            – alex gray
                            Nov 22 '15 at 20:47





                            LOVE the dialog example. SERENITY NOW!

                            – alex gray
                            Nov 22 '15 at 20:47













                            Can you only call that dialog with python?

                            – mikeymop
                            Apr 29 '16 at 19:50





                            Can you only call that dialog with python?

                            – mikeymop
                            Apr 29 '16 at 19:50




                            1




                            1





                            thanks of this answer, discovered dialog this will insanely help in writing shell scripts :D

                            – holms
                            Aug 19 '16 at 22:35





                            thanks of this answer, discovered dialog this will insanely help in writing shell scripts :D

                            – holms
                            Aug 19 '16 at 22:35




                            2




                            2





                            brew install pv dialog for Mac. Also this gentleman computes with style. Bravo.

                            – evilSnobu
                            Apr 5 '18 at 13:18





                            brew install pv dialog for Mac. Also this gentleman computes with style. Bravo.

                            – evilSnobu
                            Apr 5 '18 at 13:18











                            58














                            Use Ctrl+Shift+T while dd is running, and it will output the progress (in bytes):



                            load: 1.51  cmd: dd 31215 uninterruptible 0.28u 3.67s
                            321121+0 records in
                            321120+0 records out
                            164413440 bytes transferred in 112.708791 secs (1458745 bytes/sec)





                            share|improve this answer





















                            • 5





                              Doesn't work for me on Kubuntu Trusty. Possibly conflicting key bindings?

                              – jamadagni
                              Nov 15 '14 at 4:33






                            • 14





                              Great way. It works under OSX, but does not work under ubuntu 14.04

                              – Maxim Kholyavkin
                              Nov 17 '14 at 6:39






                            • 1





                              The first line is generated by the OS X, only the latter 3 lines are from dd.

                              – Itay Grudev
                              Apr 1 '15 at 4:49






                            • 3





                              You should be able to use kill -INFO on a BSD like OS X

                              – macshome
                              Sep 19 '15 at 13:07






                            • 1





                              This doesn't work on Ubuntu. Ctrl-T/Ctrl-Shift-T only output ^T to the terminal (except many terminal apps will intercept Ctrl-Shift-T and open a new tab). Many searchers on OSX/BSD may appreciate this answer, but it should be made clear that it's not for Ubuntu (or GNU/LInux in general?)

                              – mwfearnley
                              Nov 11 '17 at 16:28
















                            58














                            Use Ctrl+Shift+T while dd is running, and it will output the progress (in bytes):



                            load: 1.51  cmd: dd 31215 uninterruptible 0.28u 3.67s
                            321121+0 records in
                            321120+0 records out
                            164413440 bytes transferred in 112.708791 secs (1458745 bytes/sec)





                            share|improve this answer





















                            • 5





                              Doesn't work for me on Kubuntu Trusty. Possibly conflicting key bindings?

                              – jamadagni
                              Nov 15 '14 at 4:33






                            • 14





                              Great way. It works under OSX, but does not work under ubuntu 14.04

                              – Maxim Kholyavkin
                              Nov 17 '14 at 6:39






                            • 1





                              The first line is generated by the OS X, only the latter 3 lines are from dd.

                              – Itay Grudev
                              Apr 1 '15 at 4:49






                            • 3





                              You should be able to use kill -INFO on a BSD like OS X

                              – macshome
                              Sep 19 '15 at 13:07






                            • 1





                              This doesn't work on Ubuntu. Ctrl-T/Ctrl-Shift-T only output ^T to the terminal (except many terminal apps will intercept Ctrl-Shift-T and open a new tab). Many searchers on OSX/BSD may appreciate this answer, but it should be made clear that it's not for Ubuntu (or GNU/LInux in general?)

                              – mwfearnley
                              Nov 11 '17 at 16:28














                            58












                            58








                            58







                            Use Ctrl+Shift+T while dd is running, and it will output the progress (in bytes):



                            load: 1.51  cmd: dd 31215 uninterruptible 0.28u 3.67s
                            321121+0 records in
                            321120+0 records out
                            164413440 bytes transferred in 112.708791 secs (1458745 bytes/sec)





                            share|improve this answer















                            Use Ctrl+Shift+T while dd is running, and it will output the progress (in bytes):



                            load: 1.51  cmd: dd 31215 uninterruptible 0.28u 3.67s
                            321121+0 records in
                            321120+0 records out
                            164413440 bytes transferred in 112.708791 secs (1458745 bytes/sec)






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Aug 30 '17 at 20:19









                            JBaczuk

                            19818




                            19818










                            answered Oct 17 '14 at 14:15









                            0101010101010101

                            59742




                            59742








                            • 5





                              Doesn't work for me on Kubuntu Trusty. Possibly conflicting key bindings?

                              – jamadagni
                              Nov 15 '14 at 4:33






                            • 14





                              Great way. It works under OSX, but does not work under ubuntu 14.04

                              – Maxim Kholyavkin
                              Nov 17 '14 at 6:39






                            • 1





                              The first line is generated by the OS X, only the latter 3 lines are from dd.

                              – Itay Grudev
                              Apr 1 '15 at 4:49






                            • 3





                              You should be able to use kill -INFO on a BSD like OS X

                              – macshome
                              Sep 19 '15 at 13:07






                            • 1





                              This doesn't work on Ubuntu. Ctrl-T/Ctrl-Shift-T only output ^T to the terminal (except many terminal apps will intercept Ctrl-Shift-T and open a new tab). Many searchers on OSX/BSD may appreciate this answer, but it should be made clear that it's not for Ubuntu (or GNU/LInux in general?)

                              – mwfearnley
                              Nov 11 '17 at 16:28














                            • 5





                              Doesn't work for me on Kubuntu Trusty. Possibly conflicting key bindings?

                              – jamadagni
                              Nov 15 '14 at 4:33






                            • 14





                              Great way. It works under OSX, but does not work under ubuntu 14.04

                              – Maxim Kholyavkin
                              Nov 17 '14 at 6:39






                            • 1





                              The first line is generated by the OS X, only the latter 3 lines are from dd.

                              – Itay Grudev
                              Apr 1 '15 at 4:49






                            • 3





                              You should be able to use kill -INFO on a BSD like OS X

                              – macshome
                              Sep 19 '15 at 13:07






                            • 1





                              This doesn't work on Ubuntu. Ctrl-T/Ctrl-Shift-T only output ^T to the terminal (except many terminal apps will intercept Ctrl-Shift-T and open a new tab). Many searchers on OSX/BSD may appreciate this answer, but it should be made clear that it's not for Ubuntu (or GNU/LInux in general?)

                              – mwfearnley
                              Nov 11 '17 at 16:28








                            5




                            5





                            Doesn't work for me on Kubuntu Trusty. Possibly conflicting key bindings?

                            – jamadagni
                            Nov 15 '14 at 4:33





                            Doesn't work for me on Kubuntu Trusty. Possibly conflicting key bindings?

                            – jamadagni
                            Nov 15 '14 at 4:33




                            14




                            14





                            Great way. It works under OSX, but does not work under ubuntu 14.04

                            – Maxim Kholyavkin
                            Nov 17 '14 at 6:39





                            Great way. It works under OSX, but does not work under ubuntu 14.04

                            – Maxim Kholyavkin
                            Nov 17 '14 at 6:39




                            1




                            1





                            The first line is generated by the OS X, only the latter 3 lines are from dd.

                            – Itay Grudev
                            Apr 1 '15 at 4:49





                            The first line is generated by the OS X, only the latter 3 lines are from dd.

                            – Itay Grudev
                            Apr 1 '15 at 4:49




                            3




                            3





                            You should be able to use kill -INFO on a BSD like OS X

                            – macshome
                            Sep 19 '15 at 13:07





                            You should be able to use kill -INFO on a BSD like OS X

                            – macshome
                            Sep 19 '15 at 13:07




                            1




                            1





                            This doesn't work on Ubuntu. Ctrl-T/Ctrl-Shift-T only output ^T to the terminal (except many terminal apps will intercept Ctrl-Shift-T and open a new tab). Many searchers on OSX/BSD may appreciate this answer, but it should be made clear that it's not for Ubuntu (or GNU/LInux in general?)

                            – mwfearnley
                            Nov 11 '17 at 16:28





                            This doesn't work on Ubuntu. Ctrl-T/Ctrl-Shift-T only output ^T to the terminal (except many terminal apps will intercept Ctrl-Shift-T and open a new tab). Many searchers on OSX/BSD may appreciate this answer, but it should be made clear that it's not for Ubuntu (or GNU/LInux in general?)

                            – mwfearnley
                            Nov 11 '17 at 16:28











                            49














                            For the sake of completeness:



                            Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.



                            The commit introducing this change has the comment:




                            dd: new status=progress level to print stats periodically




                            Many distributions, including Ubuntu 16.04.2 LTS use this version.






                            share|improve this answer


























                            • just wanna add how I've compiled 8.24 coreutils: apt install build-essential and apt-get build-dep coreutils, then download coreutils-8.25.tar.xz, tar xvf coreutils-8.25.tar.xz configure --prefix=$HOME/usr/local and run make. Newly compiled dd will be under src dir. You can copy it to /bin and replace existing one or jus run as src/dd

                              – holms
                              Aug 19 '16 at 22:37






                            • 2





                              Cool! I like this feature. And it took just about 30 years to teach dd to print progress output. :-)

                              – Johannes Overmann
                              Apr 17 '17 at 9:34











                            • What a relief! I will immediately add this argument in a dd shell alias.

                              – Stephan Henningsen
                              May 31 '17 at 20:14













                            • Note that the status will sometimes print with two numbers, one in SI units and the equivalent value in binary units (e.g.10 MB, 9.5 MiB).

                              – palswim
                              Sep 29 '17 at 19:29
















                            49














                            For the sake of completeness:



                            Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.



                            The commit introducing this change has the comment:




                            dd: new status=progress level to print stats periodically




                            Many distributions, including Ubuntu 16.04.2 LTS use this version.






                            share|improve this answer


























                            • just wanna add how I've compiled 8.24 coreutils: apt install build-essential and apt-get build-dep coreutils, then download coreutils-8.25.tar.xz, tar xvf coreutils-8.25.tar.xz configure --prefix=$HOME/usr/local and run make. Newly compiled dd will be under src dir. You can copy it to /bin and replace existing one or jus run as src/dd

                              – holms
                              Aug 19 '16 at 22:37






                            • 2





                              Cool! I like this feature. And it took just about 30 years to teach dd to print progress output. :-)

                              – Johannes Overmann
                              Apr 17 '17 at 9:34











                            • What a relief! I will immediately add this argument in a dd shell alias.

                              – Stephan Henningsen
                              May 31 '17 at 20:14













                            • Note that the status will sometimes print with two numbers, one in SI units and the equivalent value in binary units (e.g.10 MB, 9.5 MiB).

                              – palswim
                              Sep 29 '17 at 19:29














                            49












                            49








                            49







                            For the sake of completeness:



                            Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.



                            The commit introducing this change has the comment:




                            dd: new status=progress level to print stats periodically




                            Many distributions, including Ubuntu 16.04.2 LTS use this version.






                            share|improve this answer















                            For the sake of completeness:



                            Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.



                            The commit introducing this change has the comment:




                            dd: new status=progress level to print stats periodically




                            Many distributions, including Ubuntu 16.04.2 LTS use this version.







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Jun 8 '17 at 7:44

























                            answered Oct 15 '15 at 9:24









                            davidDavidsondavidDavidson

                            59646




                            59646













                            • just wanna add how I've compiled 8.24 coreutils: apt install build-essential and apt-get build-dep coreutils, then download coreutils-8.25.tar.xz, tar xvf coreutils-8.25.tar.xz configure --prefix=$HOME/usr/local and run make. Newly compiled dd will be under src dir. You can copy it to /bin and replace existing one or jus run as src/dd

                              – holms
                              Aug 19 '16 at 22:37






                            • 2





                              Cool! I like this feature. And it took just about 30 years to teach dd to print progress output. :-)

                              – Johannes Overmann
                              Apr 17 '17 at 9:34











                            • What a relief! I will immediately add this argument in a dd shell alias.

                              – Stephan Henningsen
                              May 31 '17 at 20:14













                            • Note that the status will sometimes print with two numbers, one in SI units and the equivalent value in binary units (e.g.10 MB, 9.5 MiB).

                              – palswim
                              Sep 29 '17 at 19:29



















                            • just wanna add how I've compiled 8.24 coreutils: apt install build-essential and apt-get build-dep coreutils, then download coreutils-8.25.tar.xz, tar xvf coreutils-8.25.tar.xz configure --prefix=$HOME/usr/local and run make. Newly compiled dd will be under src dir. You can copy it to /bin and replace existing one or jus run as src/dd

                              – holms
                              Aug 19 '16 at 22:37






                            • 2





                              Cool! I like this feature. And it took just about 30 years to teach dd to print progress output. :-)

                              – Johannes Overmann
                              Apr 17 '17 at 9:34











                            • What a relief! I will immediately add this argument in a dd shell alias.

                              – Stephan Henningsen
                              May 31 '17 at 20:14













                            • Note that the status will sometimes print with two numbers, one in SI units and the equivalent value in binary units (e.g.10 MB, 9.5 MiB).

                              – palswim
                              Sep 29 '17 at 19:29

















                            just wanna add how I've compiled 8.24 coreutils: apt install build-essential and apt-get build-dep coreutils, then download coreutils-8.25.tar.xz, tar xvf coreutils-8.25.tar.xz configure --prefix=$HOME/usr/local and run make. Newly compiled dd will be under src dir. You can copy it to /bin and replace existing one or jus run as src/dd

                            – holms
                            Aug 19 '16 at 22:37





                            just wanna add how I've compiled 8.24 coreutils: apt install build-essential and apt-get build-dep coreutils, then download coreutils-8.25.tar.xz, tar xvf coreutils-8.25.tar.xz configure --prefix=$HOME/usr/local and run make. Newly compiled dd will be under src dir. You can copy it to /bin and replace existing one or jus run as src/dd

                            – holms
                            Aug 19 '16 at 22:37




                            2




                            2





                            Cool! I like this feature. And it took just about 30 years to teach dd to print progress output. :-)

                            – Johannes Overmann
                            Apr 17 '17 at 9:34





                            Cool! I like this feature. And it took just about 30 years to teach dd to print progress output. :-)

                            – Johannes Overmann
                            Apr 17 '17 at 9:34













                            What a relief! I will immediately add this argument in a dd shell alias.

                            – Stephan Henningsen
                            May 31 '17 at 20:14







                            What a relief! I will immediately add this argument in a dd shell alias.

                            – Stephan Henningsen
                            May 31 '17 at 20:14















                            Note that the status will sometimes print with two numbers, one in SI units and the equivalent value in binary units (e.g.10 MB, 9.5 MiB).

                            – palswim
                            Sep 29 '17 at 19:29





                            Note that the status will sometimes print with two numbers, one in SI units and the equivalent value in binary units (e.g.10 MB, 9.5 MiB).

                            – palswim
                            Sep 29 '17 at 19:29











                            31














                            The best is using http://dcfldd.sourceforge.net/ it is easy to install through apt-get






                            share|improve this answer



















                            • 3





                              thanks for the pointer to dcfldd, very compatible with dd but some good new features. I especially like the standard progress.

                              – Floyd
                              Dec 20 '13 at 9:46






                            • 4





                              Why dcfldd isn't more well known is a complete mystery to me.

                              – Freedom_Ben
                              Mar 3 '14 at 14:00






                            • 27





                              probably for its name.

                              – Giovanni Toraldo
                              Dec 28 '14 at 9:31











                            • It has the options of dd and option status=on by default, for progress messages, statusinterval=N (N in blocks) for message update frequency and sizeprobe=[if|of] for a percentage indicator. I will alias it to DD :)

                              – kavadias
                              May 8 '18 at 17:09
















                            31














                            The best is using http://dcfldd.sourceforge.net/ it is easy to install through apt-get






                            share|improve this answer



















                            • 3





                              thanks for the pointer to dcfldd, very compatible with dd but some good new features. I especially like the standard progress.

                              – Floyd
                              Dec 20 '13 at 9:46






                            • 4





                              Why dcfldd isn't more well known is a complete mystery to me.

                              – Freedom_Ben
                              Mar 3 '14 at 14:00






                            • 27





                              probably for its name.

                              – Giovanni Toraldo
                              Dec 28 '14 at 9:31











                            • It has the options of dd and option status=on by default, for progress messages, statusinterval=N (N in blocks) for message update frequency and sizeprobe=[if|of] for a percentage indicator. I will alias it to DD :)

                              – kavadias
                              May 8 '18 at 17:09














                            31












                            31








                            31







                            The best is using http://dcfldd.sourceforge.net/ it is easy to install through apt-get






                            share|improve this answer













                            The best is using http://dcfldd.sourceforge.net/ it is easy to install through apt-get







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 12 '13 at 14:11









                            TheNanoTheNano

                            52758




                            52758








                            • 3





                              thanks for the pointer to dcfldd, very compatible with dd but some good new features. I especially like the standard progress.

                              – Floyd
                              Dec 20 '13 at 9:46






                            • 4





                              Why dcfldd isn't more well known is a complete mystery to me.

                              – Freedom_Ben
                              Mar 3 '14 at 14:00






                            • 27





                              probably for its name.

                              – Giovanni Toraldo
                              Dec 28 '14 at 9:31











                            • It has the options of dd and option status=on by default, for progress messages, statusinterval=N (N in blocks) for message update frequency and sizeprobe=[if|of] for a percentage indicator. I will alias it to DD :)

                              – kavadias
                              May 8 '18 at 17:09














                            • 3





                              thanks for the pointer to dcfldd, very compatible with dd but some good new features. I especially like the standard progress.

                              – Floyd
                              Dec 20 '13 at 9:46






                            • 4





                              Why dcfldd isn't more well known is a complete mystery to me.

                              – Freedom_Ben
                              Mar 3 '14 at 14:00






                            • 27





                              probably for its name.

                              – Giovanni Toraldo
                              Dec 28 '14 at 9:31











                            • It has the options of dd and option status=on by default, for progress messages, statusinterval=N (N in blocks) for message update frequency and sizeprobe=[if|of] for a percentage indicator. I will alias it to DD :)

                              – kavadias
                              May 8 '18 at 17:09








                            3




                            3





                            thanks for the pointer to dcfldd, very compatible with dd but some good new features. I especially like the standard progress.

                            – Floyd
                            Dec 20 '13 at 9:46





                            thanks for the pointer to dcfldd, very compatible with dd but some good new features. I especially like the standard progress.

                            – Floyd
                            Dec 20 '13 at 9:46




                            4




                            4





                            Why dcfldd isn't more well known is a complete mystery to me.

                            – Freedom_Ben
                            Mar 3 '14 at 14:00





                            Why dcfldd isn't more well known is a complete mystery to me.

                            – Freedom_Ben
                            Mar 3 '14 at 14:00




                            27




                            27





                            probably for its name.

                            – Giovanni Toraldo
                            Dec 28 '14 at 9:31





                            probably for its name.

                            – Giovanni Toraldo
                            Dec 28 '14 at 9:31













                            It has the options of dd and option status=on by default, for progress messages, statusinterval=N (N in blocks) for message update frequency and sizeprobe=[if|of] for a percentage indicator. I will alias it to DD :)

                            – kavadias
                            May 8 '18 at 17:09





                            It has the options of dd and option status=on by default, for progress messages, statusinterval=N (N in blocks) for message update frequency and sizeprobe=[if|of] for a percentage indicator. I will alias it to DD :)

                            – kavadias
                            May 8 '18 at 17:09











                            22














                            Native progress status was added to dd!!!



                            The new version of Coreutils (8.24) adds a progress status to the dd tool:



                            Usage on Xubuntu 15.10:



                            Open a terminal and type these commands:



                            wget ftp://ftp.gnu.org/pub/gnu/coreutils/coreutils-8.24.tar.xz
                            tar -xf coreutils-8.24.tar.xz
                            cd coreutils-8.24
                            ./configure && make -j $(nproc)


                            Run dd as root:



                            sudo su
                            cd src
                            ./dd if=/dev/sdc of=/dev/sda conv=noerror status=progress


                            You will see: Bytes, seconds and speed (Bytes/second).



                            To check the versions of dd:



                            Native:



                            dd --version


                            New:



                            cd coreutils-8.24/src
                            ./dd --version





                            share|improve this answer






























                              22














                              Native progress status was added to dd!!!



                              The new version of Coreutils (8.24) adds a progress status to the dd tool:



                              Usage on Xubuntu 15.10:



                              Open a terminal and type these commands:



                              wget ftp://ftp.gnu.org/pub/gnu/coreutils/coreutils-8.24.tar.xz
                              tar -xf coreutils-8.24.tar.xz
                              cd coreutils-8.24
                              ./configure && make -j $(nproc)


                              Run dd as root:



                              sudo su
                              cd src
                              ./dd if=/dev/sdc of=/dev/sda conv=noerror status=progress


                              You will see: Bytes, seconds and speed (Bytes/second).



                              To check the versions of dd:



                              Native:



                              dd --version


                              New:



                              cd coreutils-8.24/src
                              ./dd --version





                              share|improve this answer




























                                22












                                22








                                22







                                Native progress status was added to dd!!!



                                The new version of Coreutils (8.24) adds a progress status to the dd tool:



                                Usage on Xubuntu 15.10:



                                Open a terminal and type these commands:



                                wget ftp://ftp.gnu.org/pub/gnu/coreutils/coreutils-8.24.tar.xz
                                tar -xf coreutils-8.24.tar.xz
                                cd coreutils-8.24
                                ./configure && make -j $(nproc)


                                Run dd as root:



                                sudo su
                                cd src
                                ./dd if=/dev/sdc of=/dev/sda conv=noerror status=progress


                                You will see: Bytes, seconds and speed (Bytes/second).



                                To check the versions of dd:



                                Native:



                                dd --version


                                New:



                                cd coreutils-8.24/src
                                ./dd --version





                                share|improve this answer















                                Native progress status was added to dd!!!



                                The new version of Coreutils (8.24) adds a progress status to the dd tool:



                                Usage on Xubuntu 15.10:



                                Open a terminal and type these commands:



                                wget ftp://ftp.gnu.org/pub/gnu/coreutils/coreutils-8.24.tar.xz
                                tar -xf coreutils-8.24.tar.xz
                                cd coreutils-8.24
                                ./configure && make -j $(nproc)


                                Run dd as root:



                                sudo su
                                cd src
                                ./dd if=/dev/sdc of=/dev/sda conv=noerror status=progress


                                You will see: Bytes, seconds and speed (Bytes/second).



                                To check the versions of dd:



                                Native:



                                dd --version


                                New:



                                cd coreutils-8.24/src
                                ./dd --version






                                share|improve this answer














                                share|improve this answer



                                share|improve this answer








                                edited Dec 30 '15 at 23:59

























                                answered Dec 30 '15 at 16:29









                                user3394963user3394963

                                33124




                                33124























                                    16














                                    If you have already started dd, and if you are writing a file such as when creating a copy of a pendrive to disk, you can use the watch command to constantly observe the size of the output file to see changes and estimate completion.



                                    watch ls -l /pathtofile/filename


                                    To see only file size (h-human view):



                                    watch ls -sh /pathtofile/filename





                                    share|improve this answer


























                                    • Also a viable method...

                                      – hexafraction
                                      Dec 7 '12 at 21:59






                                    • 2





                                      Useful, though this doesn't necessarily work if you're piping the dd output to something other than a file (eg gzip'ing before writing it to disk).

                                      – Ponkadoodle
                                      Jul 3 '14 at 3:32











                                    • Does not work on special files.

                                      – Johannes Overmann
                                      Feb 3 '18 at 22:10
















                                    16














                                    If you have already started dd, and if you are writing a file such as when creating a copy of a pendrive to disk, you can use the watch command to constantly observe the size of the output file to see changes and estimate completion.



                                    watch ls -l /pathtofile/filename


                                    To see only file size (h-human view):



                                    watch ls -sh /pathtofile/filename





                                    share|improve this answer


























                                    • Also a viable method...

                                      – hexafraction
                                      Dec 7 '12 at 21:59






                                    • 2





                                      Useful, though this doesn't necessarily work if you're piping the dd output to something other than a file (eg gzip'ing before writing it to disk).

                                      – Ponkadoodle
                                      Jul 3 '14 at 3:32











                                    • Does not work on special files.

                                      – Johannes Overmann
                                      Feb 3 '18 at 22:10














                                    16












                                    16








                                    16







                                    If you have already started dd, and if you are writing a file such as when creating a copy of a pendrive to disk, you can use the watch command to constantly observe the size of the output file to see changes and estimate completion.



                                    watch ls -l /pathtofile/filename


                                    To see only file size (h-human view):



                                    watch ls -sh /pathtofile/filename





                                    share|improve this answer















                                    If you have already started dd, and if you are writing a file such as when creating a copy of a pendrive to disk, you can use the watch command to constantly observe the size of the output file to see changes and estimate completion.



                                    watch ls -l /pathtofile/filename


                                    To see only file size (h-human view):



                                    watch ls -sh /pathtofile/filename






                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Mar 17 '15 at 8:54









                                    muru

                                    1




                                    1










                                    answered Dec 7 '12 at 21:46









                                    fabricator4fabricator4

                                    7,34112539




                                    7,34112539













                                    • Also a viable method...

                                      – hexafraction
                                      Dec 7 '12 at 21:59






                                    • 2





                                      Useful, though this doesn't necessarily work if you're piping the dd output to something other than a file (eg gzip'ing before writing it to disk).

                                      – Ponkadoodle
                                      Jul 3 '14 at 3:32











                                    • Does not work on special files.

                                      – Johannes Overmann
                                      Feb 3 '18 at 22:10



















                                    • Also a viable method...

                                      – hexafraction
                                      Dec 7 '12 at 21:59






                                    • 2





                                      Useful, though this doesn't necessarily work if you're piping the dd output to something other than a file (eg gzip'ing before writing it to disk).

                                      – Ponkadoodle
                                      Jul 3 '14 at 3:32











                                    • Does not work on special files.

                                      – Johannes Overmann
                                      Feb 3 '18 at 22:10

















                                    Also a viable method...

                                    – hexafraction
                                    Dec 7 '12 at 21:59





                                    Also a viable method...

                                    – hexafraction
                                    Dec 7 '12 at 21:59




                                    2




                                    2





                                    Useful, though this doesn't necessarily work if you're piping the dd output to something other than a file (eg gzip'ing before writing it to disk).

                                    – Ponkadoodle
                                    Jul 3 '14 at 3:32





                                    Useful, though this doesn't necessarily work if you're piping the dd output to something other than a file (eg gzip'ing before writing it to disk).

                                    – Ponkadoodle
                                    Jul 3 '14 at 3:32













                                    Does not work on special files.

                                    – Johannes Overmann
                                    Feb 3 '18 at 22:10





                                    Does not work on special files.

                                    – Johannes Overmann
                                    Feb 3 '18 at 22:10











                                    11














                                    The dd | pv | dd triad made my 50GB vm copy take 800 seconds, as opposed to 260 seconds using just dd. With this pipeline, at least, pv has no idea how big the input file is so it won't be able to tell you how far along you are so there's no disadvantage to doing it as follows- and you get a nice speed advantage:



                                    I would avoid pv on anything large, and (if using Bash):



                                    Control-Z the dd process



                                    bg to put it in background. Observe that bg will give you output like [1] 6011 where the latter number is a process id. So, do:



                                    while true; do kill -USR1 process_id ; sleep 5; done



                                    where process_id is the process id you observed. Hit Control-C when you see something like:



                                    [1]+  Done dd if=/path/file.qcow2 of=/dev/kvm/pxetest bs=4194304 conv=sparse
                                    -bash: kill: (60111) - No such process


                                    You are done.



                                    Edit: Silly Systems Administrator! Automate your life, don't work! If I have a long dd process that I want to monitor, here's a one-liner that will take care of the whole enchilada for you; put this all on one line:



                                     dd if=/path/to/bigimage of=/path/to/newimage conv=sparse bs=262144 & bgid=$!; while true; do sleep 1; kill -USR1 $bgid || break; sleep 4; done


                                    You can, of course, script it, perhaps make $1 your input file and $2 your output file. This is left as an exercise for the reader. Note that you need that little sleep before the kill or the kill may die trying to send a signal to dd when it's not ready yet. Adjust your sleeps as desired (maybe even remove the second sleep altogether).



                                    Bash- FTW! :-)






                                    share|improve this answer


























                                    • Compress the while loop. Use watch.

                                      – muru
                                      May 7 '15 at 15:00






                                    • 1





                                      @muru it depends. I don't know about your system but on CentOS7* the output is a little garbled; it's readable but does not look orderly. Also it stomps over your previous output so you lose history of the speed of your dd; mine varies between 20 MB/s and 300 MB/s. It's interesting to watch the numbers vary and instructive too. I think some of the large variance is due to LVM thin pools increasing the allocation for an LV I'm writing to. * yes this is an ubuntu forum but I got here looking for "dd monitor progress". It's the first result on Google.

                                      – Mike S
                                      May 7 '15 at 17:51













                                    • Oh, I meant in another terminal or screen window, run sudo watch pkill dd. Then watch dd output the stats comfortably.

                                      – muru
                                      May 7 '15 at 18:02











                                    • Won't pkill send SIGTERM by default? I don't even want to experiment, as pgrep dd comes up with 3 pid's when running a single dd: kthreadd, oddjob, and the dd. I'm afraid of what pkill will do. You could send the -USR1 signal with pkill but again I don't know if that's safe to send to the kernel thread or to obbjob. The watch command looks cleaner but it seems like a lot of extra steps just to avoid a while loop. Generally if I'm doing a dd in one window I'm going to do something right afterwards in the same shell. The while loop is safe: you know EXACTLY which pid gets the signal.

                                      – Mike S
                                      May 8 '15 at 14:01











                                    • mostly I don't care which pids get the signal, since I use watch pkill -USR1 -x dd. Since I also use watch for other similar tasks, this one comes naturally.

                                      – muru
                                      May 8 '15 at 14:07
















                                    11














                                    The dd | pv | dd triad made my 50GB vm copy take 800 seconds, as opposed to 260 seconds using just dd. With this pipeline, at least, pv has no idea how big the input file is so it won't be able to tell you how far along you are so there's no disadvantage to doing it as follows- and you get a nice speed advantage:



                                    I would avoid pv on anything large, and (if using Bash):



                                    Control-Z the dd process



                                    bg to put it in background. Observe that bg will give you output like [1] 6011 where the latter number is a process id. So, do:



                                    while true; do kill -USR1 process_id ; sleep 5; done



                                    where process_id is the process id you observed. Hit Control-C when you see something like:



                                    [1]+  Done dd if=/path/file.qcow2 of=/dev/kvm/pxetest bs=4194304 conv=sparse
                                    -bash: kill: (60111) - No such process


                                    You are done.



                                    Edit: Silly Systems Administrator! Automate your life, don't work! If I have a long dd process that I want to monitor, here's a one-liner that will take care of the whole enchilada for you; put this all on one line:



                                     dd if=/path/to/bigimage of=/path/to/newimage conv=sparse bs=262144 & bgid=$!; while true; do sleep 1; kill -USR1 $bgid || break; sleep 4; done


                                    You can, of course, script it, perhaps make $1 your input file and $2 your output file. This is left as an exercise for the reader. Note that you need that little sleep before the kill or the kill may die trying to send a signal to dd when it's not ready yet. Adjust your sleeps as desired (maybe even remove the second sleep altogether).



                                    Bash- FTW! :-)






                                    share|improve this answer


























                                    • Compress the while loop. Use watch.

                                      – muru
                                      May 7 '15 at 15:00






                                    • 1





                                      @muru it depends. I don't know about your system but on CentOS7* the output is a little garbled; it's readable but does not look orderly. Also it stomps over your previous output so you lose history of the speed of your dd; mine varies between 20 MB/s and 300 MB/s. It's interesting to watch the numbers vary and instructive too. I think some of the large variance is due to LVM thin pools increasing the allocation for an LV I'm writing to. * yes this is an ubuntu forum but I got here looking for "dd monitor progress". It's the first result on Google.

                                      – Mike S
                                      May 7 '15 at 17:51













                                    • Oh, I meant in another terminal or screen window, run sudo watch pkill dd. Then watch dd output the stats comfortably.

                                      – muru
                                      May 7 '15 at 18:02











                                    • Won't pkill send SIGTERM by default? I don't even want to experiment, as pgrep dd comes up with 3 pid's when running a single dd: kthreadd, oddjob, and the dd. I'm afraid of what pkill will do. You could send the -USR1 signal with pkill but again I don't know if that's safe to send to the kernel thread or to obbjob. The watch command looks cleaner but it seems like a lot of extra steps just to avoid a while loop. Generally if I'm doing a dd in one window I'm going to do something right afterwards in the same shell. The while loop is safe: you know EXACTLY which pid gets the signal.

                                      – Mike S
                                      May 8 '15 at 14:01











                                    • mostly I don't care which pids get the signal, since I use watch pkill -USR1 -x dd. Since I also use watch for other similar tasks, this one comes naturally.

                                      – muru
                                      May 8 '15 at 14:07














                                    11












                                    11








                                    11







                                    The dd | pv | dd triad made my 50GB vm copy take 800 seconds, as opposed to 260 seconds using just dd. With this pipeline, at least, pv has no idea how big the input file is so it won't be able to tell you how far along you are so there's no disadvantage to doing it as follows- and you get a nice speed advantage:



                                    I would avoid pv on anything large, and (if using Bash):



                                    Control-Z the dd process



                                    bg to put it in background. Observe that bg will give you output like [1] 6011 where the latter number is a process id. So, do:



                                    while true; do kill -USR1 process_id ; sleep 5; done



                                    where process_id is the process id you observed. Hit Control-C when you see something like:



                                    [1]+  Done dd if=/path/file.qcow2 of=/dev/kvm/pxetest bs=4194304 conv=sparse
                                    -bash: kill: (60111) - No such process


                                    You are done.



                                    Edit: Silly Systems Administrator! Automate your life, don't work! If I have a long dd process that I want to monitor, here's a one-liner that will take care of the whole enchilada for you; put this all on one line:



                                     dd if=/path/to/bigimage of=/path/to/newimage conv=sparse bs=262144 & bgid=$!; while true; do sleep 1; kill -USR1 $bgid || break; sleep 4; done


                                    You can, of course, script it, perhaps make $1 your input file and $2 your output file. This is left as an exercise for the reader. Note that you need that little sleep before the kill or the kill may die trying to send a signal to dd when it's not ready yet. Adjust your sleeps as desired (maybe even remove the second sleep altogether).



                                    Bash- FTW! :-)






                                    share|improve this answer















                                    The dd | pv | dd triad made my 50GB vm copy take 800 seconds, as opposed to 260 seconds using just dd. With this pipeline, at least, pv has no idea how big the input file is so it won't be able to tell you how far along you are so there's no disadvantage to doing it as follows- and you get a nice speed advantage:



                                    I would avoid pv on anything large, and (if using Bash):



                                    Control-Z the dd process



                                    bg to put it in background. Observe that bg will give you output like [1] 6011 where the latter number is a process id. So, do:



                                    while true; do kill -USR1 process_id ; sleep 5; done



                                    where process_id is the process id you observed. Hit Control-C when you see something like:



                                    [1]+  Done dd if=/path/file.qcow2 of=/dev/kvm/pxetest bs=4194304 conv=sparse
                                    -bash: kill: (60111) - No such process


                                    You are done.



                                    Edit: Silly Systems Administrator! Automate your life, don't work! If I have a long dd process that I want to monitor, here's a one-liner that will take care of the whole enchilada for you; put this all on one line:



                                     dd if=/path/to/bigimage of=/path/to/newimage conv=sparse bs=262144 & bgid=$!; while true; do sleep 1; kill -USR1 $bgid || break; sleep 4; done


                                    You can, of course, script it, perhaps make $1 your input file and $2 your output file. This is left as an exercise for the reader. Note that you need that little sleep before the kill or the kill may die trying to send a signal to dd when it's not ready yet. Adjust your sleeps as desired (maybe even remove the second sleep altogether).



                                    Bash- FTW! :-)







                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited May 7 '15 at 14:43

























                                    answered May 6 '15 at 18:32









                                    Mike SMike S

                                    25927




                                    25927













                                    • Compress the while loop. Use watch.

                                      – muru
                                      May 7 '15 at 15:00






                                    • 1





                                      @muru it depends. I don't know about your system but on CentOS7* the output is a little garbled; it's readable but does not look orderly. Also it stomps over your previous output so you lose history of the speed of your dd; mine varies between 20 MB/s and 300 MB/s. It's interesting to watch the numbers vary and instructive too. I think some of the large variance is due to LVM thin pools increasing the allocation for an LV I'm writing to. * yes this is an ubuntu forum but I got here looking for "dd monitor progress". It's the first result on Google.

                                      – Mike S
                                      May 7 '15 at 17:51













                                    • Oh, I meant in another terminal or screen window, run sudo watch pkill dd. Then watch dd output the stats comfortably.

                                      – muru
                                      May 7 '15 at 18:02











                                    • Won't pkill send SIGTERM by default? I don't even want to experiment, as pgrep dd comes up with 3 pid's when running a single dd: kthreadd, oddjob, and the dd. I'm afraid of what pkill will do. You could send the -USR1 signal with pkill but again I don't know if that's safe to send to the kernel thread or to obbjob. The watch command looks cleaner but it seems like a lot of extra steps just to avoid a while loop. Generally if I'm doing a dd in one window I'm going to do something right afterwards in the same shell. The while loop is safe: you know EXACTLY which pid gets the signal.

                                      – Mike S
                                      May 8 '15 at 14:01











                                    • mostly I don't care which pids get the signal, since I use watch pkill -USR1 -x dd. Since I also use watch for other similar tasks, this one comes naturally.

                                      – muru
                                      May 8 '15 at 14:07



















                                    • Compress the while loop. Use watch.

                                      – muru
                                      May 7 '15 at 15:00






                                    • 1





                                      @muru it depends. I don't know about your system but on CentOS7* the output is a little garbled; it's readable but does not look orderly. Also it stomps over your previous output so you lose history of the speed of your dd; mine varies between 20 MB/s and 300 MB/s. It's interesting to watch the numbers vary and instructive too. I think some of the large variance is due to LVM thin pools increasing the allocation for an LV I'm writing to. * yes this is an ubuntu forum but I got here looking for "dd monitor progress". It's the first result on Google.

                                      – Mike S
                                      May 7 '15 at 17:51













                                    • Oh, I meant in another terminal or screen window, run sudo watch pkill dd. Then watch dd output the stats comfortably.

                                      – muru
                                      May 7 '15 at 18:02











                                    • Won't pkill send SIGTERM by default? I don't even want to experiment, as pgrep dd comes up with 3 pid's when running a single dd: kthreadd, oddjob, and the dd. I'm afraid of what pkill will do. You could send the -USR1 signal with pkill but again I don't know if that's safe to send to the kernel thread or to obbjob. The watch command looks cleaner but it seems like a lot of extra steps just to avoid a while loop. Generally if I'm doing a dd in one window I'm going to do something right afterwards in the same shell. The while loop is safe: you know EXACTLY which pid gets the signal.

                                      – Mike S
                                      May 8 '15 at 14:01











                                    • mostly I don't care which pids get the signal, since I use watch pkill -USR1 -x dd. Since I also use watch for other similar tasks, this one comes naturally.

                                      – muru
                                      May 8 '15 at 14:07

















                                    Compress the while loop. Use watch.

                                    – muru
                                    May 7 '15 at 15:00





                                    Compress the while loop. Use watch.

                                    – muru
                                    May 7 '15 at 15:00




                                    1




                                    1





                                    @muru it depends. I don't know about your system but on CentOS7* the output is a little garbled; it's readable but does not look orderly. Also it stomps over your previous output so you lose history of the speed of your dd; mine varies between 20 MB/s and 300 MB/s. It's interesting to watch the numbers vary and instructive too. I think some of the large variance is due to LVM thin pools increasing the allocation for an LV I'm writing to. * yes this is an ubuntu forum but I got here looking for "dd monitor progress". It's the first result on Google.

                                    – Mike S
                                    May 7 '15 at 17:51







                                    @muru it depends. I don't know about your system but on CentOS7* the output is a little garbled; it's readable but does not look orderly. Also it stomps over your previous output so you lose history of the speed of your dd; mine varies between 20 MB/s and 300 MB/s. It's interesting to watch the numbers vary and instructive too. I think some of the large variance is due to LVM thin pools increasing the allocation for an LV I'm writing to. * yes this is an ubuntu forum but I got here looking for "dd monitor progress". It's the first result on Google.

                                    – Mike S
                                    May 7 '15 at 17:51















                                    Oh, I meant in another terminal or screen window, run sudo watch pkill dd. Then watch dd output the stats comfortably.

                                    – muru
                                    May 7 '15 at 18:02





                                    Oh, I meant in another terminal or screen window, run sudo watch pkill dd. Then watch dd output the stats comfortably.

                                    – muru
                                    May 7 '15 at 18:02













                                    Won't pkill send SIGTERM by default? I don't even want to experiment, as pgrep dd comes up with 3 pid's when running a single dd: kthreadd, oddjob, and the dd. I'm afraid of what pkill will do. You could send the -USR1 signal with pkill but again I don't know if that's safe to send to the kernel thread or to obbjob. The watch command looks cleaner but it seems like a lot of extra steps just to avoid a while loop. Generally if I'm doing a dd in one window I'm going to do something right afterwards in the same shell. The while loop is safe: you know EXACTLY which pid gets the signal.

                                    – Mike S
                                    May 8 '15 at 14:01





                                    Won't pkill send SIGTERM by default? I don't even want to experiment, as pgrep dd comes up with 3 pid's when running a single dd: kthreadd, oddjob, and the dd. I'm afraid of what pkill will do. You could send the -USR1 signal with pkill but again I don't know if that's safe to send to the kernel thread or to obbjob. The watch command looks cleaner but it seems like a lot of extra steps just to avoid a while loop. Generally if I'm doing a dd in one window I'm going to do something right afterwards in the same shell. The while loop is safe: you know EXACTLY which pid gets the signal.

                                    – Mike S
                                    May 8 '15 at 14:01













                                    mostly I don't care which pids get the signal, since I use watch pkill -USR1 -x dd. Since I also use watch for other similar tasks, this one comes naturally.

                                    – muru
                                    May 8 '15 at 14:07





                                    mostly I don't care which pids get the signal, since I use watch pkill -USR1 -x dd. Since I also use watch for other similar tasks, this one comes naturally.

                                    – muru
                                    May 8 '15 at 14:07











                                    10














                                    http://linuxcommando.blogspot.com/2008/06/show-progress-during-dd-copy.html



                                    Basically:



                                    kill -USR1 < dd pid >





                                    share|improve this answer





















                                    • 1





                                      "pkill -USR1 dd" is the simplest version I'm aware of (as long as you're just running one instance of dd, anyway). On my system I need sudo: "sudo pkill -USR1 dd". Works after you've typed the dd command, and you don't need to install anything new.

                                      – Fred Hamilton
                                      May 18 '15 at 18:49


















                                    10














                                    http://linuxcommando.blogspot.com/2008/06/show-progress-during-dd-copy.html



                                    Basically:



                                    kill -USR1 < dd pid >





                                    share|improve this answer





















                                    • 1





                                      "pkill -USR1 dd" is the simplest version I'm aware of (as long as you're just running one instance of dd, anyway). On my system I need sudo: "sudo pkill -USR1 dd". Works after you've typed the dd command, and you don't need to install anything new.

                                      – Fred Hamilton
                                      May 18 '15 at 18:49
















                                    10












                                    10








                                    10







                                    http://linuxcommando.blogspot.com/2008/06/show-progress-during-dd-copy.html



                                    Basically:



                                    kill -USR1 < dd pid >





                                    share|improve this answer















                                    http://linuxcommando.blogspot.com/2008/06/show-progress-during-dd-copy.html



                                    Basically:



                                    kill -USR1 < dd pid >






                                    share|improve this answer














                                    share|improve this answer



                                    share|improve this answer








                                    edited Dec 30 '15 at 16:45









                                    muru

                                    1




                                    1










                                    answered Nov 10 '12 at 20:30









                                    hnasarathnasarat

                                    1,151914




                                    1,151914








                                    • 1





                                      "pkill -USR1 dd" is the simplest version I'm aware of (as long as you're just running one instance of dd, anyway). On my system I need sudo: "sudo pkill -USR1 dd". Works after you've typed the dd command, and you don't need to install anything new.

                                      – Fred Hamilton
                                      May 18 '15 at 18:49
















                                    • 1





                                      "pkill -USR1 dd" is the simplest version I'm aware of (as long as you're just running one instance of dd, anyway). On my system I need sudo: "sudo pkill -USR1 dd". Works after you've typed the dd command, and you don't need to install anything new.

                                      – Fred Hamilton
                                      May 18 '15 at 18:49










                                    1




                                    1





                                    "pkill -USR1 dd" is the simplest version I'm aware of (as long as you're just running one instance of dd, anyway). On my system I need sudo: "sudo pkill -USR1 dd". Works after you've typed the dd command, and you don't need to install anything new.

                                    – Fred Hamilton
                                    May 18 '15 at 18:49







                                    "pkill -USR1 dd" is the simplest version I'm aware of (as long as you're just running one instance of dd, anyway). On my system I need sudo: "sudo pkill -USR1 dd". Works after you've typed the dd command, and you don't need to install anything new.

                                    – Fred Hamilton
                                    May 18 '15 at 18:49













                                    6














                                    On Ubuntu 16.04



                                    Ubuntu 16.04 comes with dd (coreutils) Version 8.25 . Hence the option status=progress is Supported :-)



                                    To use it, just add status=progress along with your dd command.



                                    Example :



                                    dd bs=4M if=/media/severus/tools-soft/OperatingSystems/ubuntu-16.04-desktop-amd64.iso of=/dev/null status=progress && sync


                                    Gives the status as



                                    1282846183 bytes (1.2 GiB, 1.1 GiB) copied, 14.03 s, 101.9 MB/s


                                    enter image description here






                                    share|improve this answer




























                                      6














                                      On Ubuntu 16.04



                                      Ubuntu 16.04 comes with dd (coreutils) Version 8.25 . Hence the option status=progress is Supported :-)



                                      To use it, just add status=progress along with your dd command.



                                      Example :



                                      dd bs=4M if=/media/severus/tools-soft/OperatingSystems/ubuntu-16.04-desktop-amd64.iso of=/dev/null status=progress && sync


                                      Gives the status as



                                      1282846183 bytes (1.2 GiB, 1.1 GiB) copied, 14.03 s, 101.9 MB/s


                                      enter image description here






                                      share|improve this answer


























                                        6












                                        6








                                        6







                                        On Ubuntu 16.04



                                        Ubuntu 16.04 comes with dd (coreutils) Version 8.25 . Hence the option status=progress is Supported :-)



                                        To use it, just add status=progress along with your dd command.



                                        Example :



                                        dd bs=4M if=/media/severus/tools-soft/OperatingSystems/ubuntu-16.04-desktop-amd64.iso of=/dev/null status=progress && sync


                                        Gives the status as



                                        1282846183 bytes (1.2 GiB, 1.1 GiB) copied, 14.03 s, 101.9 MB/s


                                        enter image description here






                                        share|improve this answer













                                        On Ubuntu 16.04



                                        Ubuntu 16.04 comes with dd (coreutils) Version 8.25 . Hence the option status=progress is Supported :-)



                                        To use it, just add status=progress along with your dd command.



                                        Example :



                                        dd bs=4M if=/media/severus/tools-soft/OperatingSystems/ubuntu-16.04-desktop-amd64.iso of=/dev/null status=progress && sync


                                        Gives the status as



                                        1282846183 bytes (1.2 GiB, 1.1 GiB) copied, 14.03 s, 101.9 MB/s


                                        enter image description here







                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Jun 25 '16 at 4:54









                                        Severus TuxSeverus Tux

                                        5,73143882




                                        5,73143882























                                            6














                                            Easiest is:



                                             dd if=... of=... bs=4M status=progress oflag=dsync


                                            oflag=dsync will keep your writing in sync, so information of status=progress is more accurate. However it might be a bit slower.






                                            share|improve this answer



















                                            • 1





                                              according to gnu.org/software/coreutils/manual/html_node/dd-invocation.html , using conv=fsync is better

                                              – Chen Deng-Ta
                                              Jun 24 '17 at 12:49













                                            • Thanks for this! I'm doing dd to a remote lvm2 and the bs=4M increased my transfer by a factor of 20 and the progress indication is wonderful.

                                              – Lonnie Best
                                              Jan 19 '18 at 8:26
















                                            6














                                            Easiest is:



                                             dd if=... of=... bs=4M status=progress oflag=dsync


                                            oflag=dsync will keep your writing in sync, so information of status=progress is more accurate. However it might be a bit slower.






                                            share|improve this answer



















                                            • 1





                                              according to gnu.org/software/coreutils/manual/html_node/dd-invocation.html , using conv=fsync is better

                                              – Chen Deng-Ta
                                              Jun 24 '17 at 12:49













                                            • Thanks for this! I'm doing dd to a remote lvm2 and the bs=4M increased my transfer by a factor of 20 and the progress indication is wonderful.

                                              – Lonnie Best
                                              Jan 19 '18 at 8:26














                                            6












                                            6








                                            6







                                            Easiest is:



                                             dd if=... of=... bs=4M status=progress oflag=dsync


                                            oflag=dsync will keep your writing in sync, so information of status=progress is more accurate. However it might be a bit slower.






                                            share|improve this answer













                                            Easiest is:



                                             dd if=... of=... bs=4M status=progress oflag=dsync


                                            oflag=dsync will keep your writing in sync, so information of status=progress is more accurate. However it might be a bit slower.







                                            share|improve this answer












                                            share|improve this answer



                                            share|improve this answer










                                            answered Oct 4 '16 at 6:46









                                            zeverozevero

                                            16912




                                            16912








                                            • 1





                                              according to gnu.org/software/coreutils/manual/html_node/dd-invocation.html , using conv=fsync is better

                                              – Chen Deng-Ta
                                              Jun 24 '17 at 12:49













                                            • Thanks for this! I'm doing dd to a remote lvm2 and the bs=4M increased my transfer by a factor of 20 and the progress indication is wonderful.

                                              – Lonnie Best
                                              Jan 19 '18 at 8:26














                                            • 1





                                              according to gnu.org/software/coreutils/manual/html_node/dd-invocation.html , using conv=fsync is better

                                              – Chen Deng-Ta
                                              Jun 24 '17 at 12:49













                                            • Thanks for this! I'm doing dd to a remote lvm2 and the bs=4M increased my transfer by a factor of 20 and the progress indication is wonderful.

                                              – Lonnie Best
                                              Jan 19 '18 at 8:26








                                            1




                                            1





                                            according to gnu.org/software/coreutils/manual/html_node/dd-invocation.html , using conv=fsync is better

                                            – Chen Deng-Ta
                                            Jun 24 '17 at 12:49







                                            according to gnu.org/software/coreutils/manual/html_node/dd-invocation.html , using conv=fsync is better

                                            – Chen Deng-Ta
                                            Jun 24 '17 at 12:49















                                            Thanks for this! I'm doing dd to a remote lvm2 and the bs=4M increased my transfer by a factor of 20 and the progress indication is wonderful.

                                            – Lonnie Best
                                            Jan 19 '18 at 8:26





                                            Thanks for this! I'm doing dd to a remote lvm2 and the bs=4M increased my transfer by a factor of 20 and the progress indication is wonderful.

                                            – Lonnie Best
                                            Jan 19 '18 at 8:26











                                            4














                                            I really like ddrescue, it works as dd but gives output and doesn't fail on errors, on the contrary it has a very advanced algorithm an tries really hard to do a successful copy... There are also many GUIs for it



                                            Project: https://www.gnu.org/software/ddrescue



                                            Wikipedia: https://en.wikipedia.org/wiki/Ddrescue



                                            enter image description here






                                            share|improve this answer




























                                              4














                                              I really like ddrescue, it works as dd but gives output and doesn't fail on errors, on the contrary it has a very advanced algorithm an tries really hard to do a successful copy... There are also many GUIs for it



                                              Project: https://www.gnu.org/software/ddrescue



                                              Wikipedia: https://en.wikipedia.org/wiki/Ddrescue



                                              enter image description here






                                              share|improve this answer


























                                                4












                                                4








                                                4







                                                I really like ddrescue, it works as dd but gives output and doesn't fail on errors, on the contrary it has a very advanced algorithm an tries really hard to do a successful copy... There are also many GUIs for it



                                                Project: https://www.gnu.org/software/ddrescue



                                                Wikipedia: https://en.wikipedia.org/wiki/Ddrescue



                                                enter image description here






                                                share|improve this answer













                                                I really like ddrescue, it works as dd but gives output and doesn't fail on errors, on the contrary it has a very advanced algorithm an tries really hard to do a successful copy... There are also many GUIs for it



                                                Project: https://www.gnu.org/software/ddrescue



                                                Wikipedia: https://en.wikipedia.org/wiki/Ddrescue



                                                enter image description here







                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Feb 17 '16 at 5:55









                                                SuperMauSuperMau

                                                1,15369




                                                1,15369























                                                    3














                                                    I have created bash wrapper over dd that will use pv to show progress. Put it into your .bashrc and use dd as usual:



                                                    # dd if=/dev/vvg0/root of=/dev/vvg1/root bs=4M
                                                    2GB 0:00:17 [ 120MB/s] [===========================================================>] 100%
                                                    0+16384 records in
                                                    0+16384 records out
                                                    2147483648 bytes (2.1 GB) copied, 18.3353 s, 117 MB/s


                                                    Source:



                                                    dd()
                                                    {
                                                    local dd=$(which dd); [ "$dd" ] || {
                                                    echo "'dd' is not installed!" >&2
                                                    return 1
                                                    }

                                                    local pv=$(which pv); [ "$pv" ] || {
                                                    echo "'pv' is not installed!" >&2
                                                    "$dd" "$@"
                                                    return $?
                                                    }

                                                    local arg arg2 infile
                                                    local -a args
                                                    for arg in "$@"
                                                    do
                                                    arg2=${arg#if=}
                                                    if [ "$arg2" != "$arg" ]
                                                    then
                                                    infile=$arg2
                                                    else
                                                    args[${#args[@]}]=$arg
                                                    fi
                                                    done

                                                    "$pv" -tpreb "$infile" | "$dd" "${args[@]}"
                                                    }





                                                    share|improve this answer


























                                                    • Good way but it does not work with commands like sudo or time.

                                                      – Maxim Kholyavkin
                                                      Nov 17 '14 at 7:28






                                                    • 1





                                                      Put it into /usr/local/bin/dd with this on top: #!/bin/bash. On bottom: tmp=":${PATH}:"; tmp=${tmp/:/usr/local/bin:/:}; tmp=${tmp%:}; PATH=${tmp#:}; dd "$@" Or you may wish to hardcode dd location. Then use local dd=/usr/bin/dd. Don't forget to add executable bit: chmod +x /usr/local/dd.

                                                      – midenok
                                                      Nov 19 '14 at 7:06


















                                                    3














                                                    I have created bash wrapper over dd that will use pv to show progress. Put it into your .bashrc and use dd as usual:



                                                    # dd if=/dev/vvg0/root of=/dev/vvg1/root bs=4M
                                                    2GB 0:00:17 [ 120MB/s] [===========================================================>] 100%
                                                    0+16384 records in
                                                    0+16384 records out
                                                    2147483648 bytes (2.1 GB) copied, 18.3353 s, 117 MB/s


                                                    Source:



                                                    dd()
                                                    {
                                                    local dd=$(which dd); [ "$dd" ] || {
                                                    echo "'dd' is not installed!" >&2
                                                    return 1
                                                    }

                                                    local pv=$(which pv); [ "$pv" ] || {
                                                    echo "'pv' is not installed!" >&2
                                                    "$dd" "$@"
                                                    return $?
                                                    }

                                                    local arg arg2 infile
                                                    local -a args
                                                    for arg in "$@"
                                                    do
                                                    arg2=${arg#if=}
                                                    if [ "$arg2" != "$arg" ]
                                                    then
                                                    infile=$arg2
                                                    else
                                                    args[${#args[@]}]=$arg
                                                    fi
                                                    done

                                                    "$pv" -tpreb "$infile" | "$dd" "${args[@]}"
                                                    }





                                                    share|improve this answer


























                                                    • Good way but it does not work with commands like sudo or time.

                                                      – Maxim Kholyavkin
                                                      Nov 17 '14 at 7:28






                                                    • 1





                                                      Put it into /usr/local/bin/dd with this on top: #!/bin/bash. On bottom: tmp=":${PATH}:"; tmp=${tmp/:/usr/local/bin:/:}; tmp=${tmp%:}; PATH=${tmp#:}; dd "$@" Or you may wish to hardcode dd location. Then use local dd=/usr/bin/dd. Don't forget to add executable bit: chmod +x /usr/local/dd.

                                                      – midenok
                                                      Nov 19 '14 at 7:06
















                                                    3












                                                    3








                                                    3







                                                    I have created bash wrapper over dd that will use pv to show progress. Put it into your .bashrc and use dd as usual:



                                                    # dd if=/dev/vvg0/root of=/dev/vvg1/root bs=4M
                                                    2GB 0:00:17 [ 120MB/s] [===========================================================>] 100%
                                                    0+16384 records in
                                                    0+16384 records out
                                                    2147483648 bytes (2.1 GB) copied, 18.3353 s, 117 MB/s


                                                    Source:



                                                    dd()
                                                    {
                                                    local dd=$(which dd); [ "$dd" ] || {
                                                    echo "'dd' is not installed!" >&2
                                                    return 1
                                                    }

                                                    local pv=$(which pv); [ "$pv" ] || {
                                                    echo "'pv' is not installed!" >&2
                                                    "$dd" "$@"
                                                    return $?
                                                    }

                                                    local arg arg2 infile
                                                    local -a args
                                                    for arg in "$@"
                                                    do
                                                    arg2=${arg#if=}
                                                    if [ "$arg2" != "$arg" ]
                                                    then
                                                    infile=$arg2
                                                    else
                                                    args[${#args[@]}]=$arg
                                                    fi
                                                    done

                                                    "$pv" -tpreb "$infile" | "$dd" "${args[@]}"
                                                    }





                                                    share|improve this answer















                                                    I have created bash wrapper over dd that will use pv to show progress. Put it into your .bashrc and use dd as usual:



                                                    # dd if=/dev/vvg0/root of=/dev/vvg1/root bs=4M
                                                    2GB 0:00:17 [ 120MB/s] [===========================================================>] 100%
                                                    0+16384 records in
                                                    0+16384 records out
                                                    2147483648 bytes (2.1 GB) copied, 18.3353 s, 117 MB/s


                                                    Source:



                                                    dd()
                                                    {
                                                    local dd=$(which dd); [ "$dd" ] || {
                                                    echo "'dd' is not installed!" >&2
                                                    return 1
                                                    }

                                                    local pv=$(which pv); [ "$pv" ] || {
                                                    echo "'pv' is not installed!" >&2
                                                    "$dd" "$@"
                                                    return $?
                                                    }

                                                    local arg arg2 infile
                                                    local -a args
                                                    for arg in "$@"
                                                    do
                                                    arg2=${arg#if=}
                                                    if [ "$arg2" != "$arg" ]
                                                    then
                                                    infile=$arg2
                                                    else
                                                    args[${#args[@]}]=$arg
                                                    fi
                                                    done

                                                    "$pv" -tpreb "$infile" | "$dd" "${args[@]}"
                                                    }






                                                    share|improve this answer














                                                    share|improve this answer



                                                    share|improve this answer








                                                    edited Oct 20 '14 at 11:38

























                                                    answered Oct 20 '14 at 11:32









                                                    midenokmidenok

                                                    42736




                                                    42736













                                                    • Good way but it does not work with commands like sudo or time.

                                                      – Maxim Kholyavkin
                                                      Nov 17 '14 at 7:28






                                                    • 1





                                                      Put it into /usr/local/bin/dd with this on top: #!/bin/bash. On bottom: tmp=":${PATH}:"; tmp=${tmp/:/usr/local/bin:/:}; tmp=${tmp%:}; PATH=${tmp#:}; dd "$@" Or you may wish to hardcode dd location. Then use local dd=/usr/bin/dd. Don't forget to add executable bit: chmod +x /usr/local/dd.

                                                      – midenok
                                                      Nov 19 '14 at 7:06





















                                                    • Good way but it does not work with commands like sudo or time.

                                                      – Maxim Kholyavkin
                                                      Nov 17 '14 at 7:28






                                                    • 1





                                                      Put it into /usr/local/bin/dd with this on top: #!/bin/bash. On bottom: tmp=":${PATH}:"; tmp=${tmp/:/usr/local/bin:/:}; tmp=${tmp%:}; PATH=${tmp#:}; dd "$@" Or you may wish to hardcode dd location. Then use local dd=/usr/bin/dd. Don't forget to add executable bit: chmod +x /usr/local/dd.

                                                      – midenok
                                                      Nov 19 '14 at 7:06



















                                                    Good way but it does not work with commands like sudo or time.

                                                    – Maxim Kholyavkin
                                                    Nov 17 '14 at 7:28





                                                    Good way but it does not work with commands like sudo or time.

                                                    – Maxim Kholyavkin
                                                    Nov 17 '14 at 7:28




                                                    1




                                                    1





                                                    Put it into /usr/local/bin/dd with this on top: #!/bin/bash. On bottom: tmp=":${PATH}:"; tmp=${tmp/:/usr/local/bin:/:}; tmp=${tmp%:}; PATH=${tmp#:}; dd "$@" Or you may wish to hardcode dd location. Then use local dd=/usr/bin/dd. Don't forget to add executable bit: chmod +x /usr/local/dd.

                                                    – midenok
                                                    Nov 19 '14 at 7:06







                                                    Put it into /usr/local/bin/dd with this on top: #!/bin/bash. On bottom: tmp=":${PATH}:"; tmp=${tmp/:/usr/local/bin:/:}; tmp=${tmp%:}; PATH=${tmp#:}; dd "$@" Or you may wish to hardcode dd location. Then use local dd=/usr/bin/dd. Don't forget to add executable bit: chmod +x /usr/local/dd.

                                                    – midenok
                                                    Nov 19 '14 at 7:06













                                                    3














                                                    Use option status=progress to get the progress during the transfert.



                                                    In addition, conv=fsync will display I/O errors.



                                                    Example:



                                                    sudo dd if=mydistrib.iso of=/dev/sdb status=progress conv=fsync





                                                    share|improve this answer




























                                                      3














                                                      Use option status=progress to get the progress during the transfert.



                                                      In addition, conv=fsync will display I/O errors.



                                                      Example:



                                                      sudo dd if=mydistrib.iso of=/dev/sdb status=progress conv=fsync





                                                      share|improve this answer


























                                                        3












                                                        3








                                                        3







                                                        Use option status=progress to get the progress during the transfert.



                                                        In addition, conv=fsync will display I/O errors.



                                                        Example:



                                                        sudo dd if=mydistrib.iso of=/dev/sdb status=progress conv=fsync





                                                        share|improve this answer













                                                        Use option status=progress to get the progress during the transfert.



                                                        In addition, conv=fsync will display I/O errors.



                                                        Example:



                                                        sudo dd if=mydistrib.iso of=/dev/sdb status=progress conv=fsync






                                                        share|improve this answer












                                                        share|improve this answer



                                                        share|improve this answer










                                                        answered May 25 '18 at 11:38









                                                        MUY BelgiumMUY Belgium

                                                        1919




                                                        1919























                                                            2














                                                            So today I got a little frustrated with trying to run kill in a loop while dd was running, and came up with this method for running them in parallel, easily:



                                                            function vdd {
                                                            sudo dd "$@" &
                                                            sudo sh -c "while pkill -10 ^dd$; do sleep 5; done"
                                                            }


                                                            Now just use vdd anywhere you'd normally use dd (it passes all arguments directly through) and you'll get a progress report printed every 5s.



                                                            The only downside is that the command doesn't return immediately when dd completes; so it's possible that this command can keep you waiting an extra 5s after dd returns before it notices and exits.






                                                            share|improve this answer




























                                                              2














                                                              So today I got a little frustrated with trying to run kill in a loop while dd was running, and came up with this method for running them in parallel, easily:



                                                              function vdd {
                                                              sudo dd "$@" &
                                                              sudo sh -c "while pkill -10 ^dd$; do sleep 5; done"
                                                              }


                                                              Now just use vdd anywhere you'd normally use dd (it passes all arguments directly through) and you'll get a progress report printed every 5s.



                                                              The only downside is that the command doesn't return immediately when dd completes; so it's possible that this command can keep you waiting an extra 5s after dd returns before it notices and exits.






                                                              share|improve this answer


























                                                                2












                                                                2








                                                                2







                                                                So today I got a little frustrated with trying to run kill in a loop while dd was running, and came up with this method for running them in parallel, easily:



                                                                function vdd {
                                                                sudo dd "$@" &
                                                                sudo sh -c "while pkill -10 ^dd$; do sleep 5; done"
                                                                }


                                                                Now just use vdd anywhere you'd normally use dd (it passes all arguments directly through) and you'll get a progress report printed every 5s.



                                                                The only downside is that the command doesn't return immediately when dd completes; so it's possible that this command can keep you waiting an extra 5s after dd returns before it notices and exits.






                                                                share|improve this answer













                                                                So today I got a little frustrated with trying to run kill in a loop while dd was running, and came up with this method for running them in parallel, easily:



                                                                function vdd {
                                                                sudo dd "$@" &
                                                                sudo sh -c "while pkill -10 ^dd$; do sleep 5; done"
                                                                }


                                                                Now just use vdd anywhere you'd normally use dd (it passes all arguments directly through) and you'll get a progress report printed every 5s.



                                                                The only downside is that the command doesn't return immediately when dd completes; so it's possible that this command can keep you waiting an extra 5s after dd returns before it notices and exits.







                                                                share|improve this answer












                                                                share|improve this answer



                                                                share|improve this answer










                                                                answered Apr 11 '14 at 0:41









                                                                robrurobru

                                                                604718




                                                                604718























                                                                    2














                                                                    This one forces dd to provide stats every 2 seconds which is default for watch:



                                                                    watch killall -USR1 dd


                                                                    To change from every 2 seconds to every 5 seconds, add -n 5 option like this:



                                                                    watch -n 5 killall -USR1 dd





                                                                    share|improve this answer






























                                                                      2














                                                                      This one forces dd to provide stats every 2 seconds which is default for watch:



                                                                      watch killall -USR1 dd


                                                                      To change from every 2 seconds to every 5 seconds, add -n 5 option like this:



                                                                      watch -n 5 killall -USR1 dd





                                                                      share|improve this answer




























                                                                        2












                                                                        2








                                                                        2







                                                                        This one forces dd to provide stats every 2 seconds which is default for watch:



                                                                        watch killall -USR1 dd


                                                                        To change from every 2 seconds to every 5 seconds, add -n 5 option like this:



                                                                        watch -n 5 killall -USR1 dd





                                                                        share|improve this answer















                                                                        This one forces dd to provide stats every 2 seconds which is default for watch:



                                                                        watch killall -USR1 dd


                                                                        To change from every 2 seconds to every 5 seconds, add -n 5 option like this:



                                                                        watch -n 5 killall -USR1 dd






                                                                        share|improve this answer














                                                                        share|improve this answer



                                                                        share|improve this answer








                                                                        edited Feb 1 '18 at 3:55

























                                                                        answered Jan 30 '18 at 20:24









                                                                        KostyantynKostyantyn

                                                                        42638




                                                                        42638























                                                                            1














                                                                            As mentioned above, at least with the 'dd' from GNU coreutils, or busybox, it will respond to a USR1 signal by printing progress info to stderr.



                                                                            I wrote a little wrapper script for dd that shows a nice percent-complete indicator, and tries to not interfere with dd's process or way of functioning in any way. You can find it on github:



                                                                            http://github.com/delt01/dd_printpercent



                                                                            Unfortunately, this SIGUSR1 trick only works with either GNU dd (from the coreutils package) or busybox's 'dd' mode with that specific feature enabled at compile time. It doesn't work with the stock 'dd' included with most BSD systems, including FreeBSD and OS X ... :(






                                                                            share|improve this answer




























                                                                              1














                                                                              As mentioned above, at least with the 'dd' from GNU coreutils, or busybox, it will respond to a USR1 signal by printing progress info to stderr.



                                                                              I wrote a little wrapper script for dd that shows a nice percent-complete indicator, and tries to not interfere with dd's process or way of functioning in any way. You can find it on github:



                                                                              http://github.com/delt01/dd_printpercent



                                                                              Unfortunately, this SIGUSR1 trick only works with either GNU dd (from the coreutils package) or busybox's 'dd' mode with that specific feature enabled at compile time. It doesn't work with the stock 'dd' included with most BSD systems, including FreeBSD and OS X ... :(






                                                                              share|improve this answer


























                                                                                1












                                                                                1








                                                                                1







                                                                                As mentioned above, at least with the 'dd' from GNU coreutils, or busybox, it will respond to a USR1 signal by printing progress info to stderr.



                                                                                I wrote a little wrapper script for dd that shows a nice percent-complete indicator, and tries to not interfere with dd's process or way of functioning in any way. You can find it on github:



                                                                                http://github.com/delt01/dd_printpercent



                                                                                Unfortunately, this SIGUSR1 trick only works with either GNU dd (from the coreutils package) or busybox's 'dd' mode with that specific feature enabled at compile time. It doesn't work with the stock 'dd' included with most BSD systems, including FreeBSD and OS X ... :(






                                                                                share|improve this answer













                                                                                As mentioned above, at least with the 'dd' from GNU coreutils, or busybox, it will respond to a USR1 signal by printing progress info to stderr.



                                                                                I wrote a little wrapper script for dd that shows a nice percent-complete indicator, and tries to not interfere with dd's process or way of functioning in any way. You can find it on github:



                                                                                http://github.com/delt01/dd_printpercent



                                                                                Unfortunately, this SIGUSR1 trick only works with either GNU dd (from the coreutils package) or busybox's 'dd' mode with that specific feature enabled at compile time. It doesn't work with the stock 'dd' included with most BSD systems, including FreeBSD and OS X ... :(







                                                                                share|improve this answer












                                                                                share|improve this answer



                                                                                share|improve this answer










                                                                                answered Sep 10 '15 at 6:29









                                                                                deltdelt

                                                                                291




                                                                                291























                                                                                    1














                                                                                    You can watch the progress of any coreutils program using progress - Coreutils Progress Viewer.



                                                                                    It can monitor:



                                                                                    cp mv dd tar cat rsync grep fgrep egrep cut sort md5sum sha1sum sha224sum sha256sum sha384sum sha512sum adb gzip gunzip bzip2 bunzip2 xz unxz lzma unlzma 7z 7za zcat bzcat lzcat split gpg



                                                                                    You can see the manpage



                                                                                    You can use it in a seperate terminal window while the command is running or launch it with the dd command:



                                                                                    dd if=/dev/sda of=file.img & progress -mp $!


                                                                                    Here & forks the first command and continues immediately instead of waiting until the command ends.



                                                                                    The progress command is launched with: -m so it waits until the monitored process ended, -p so it monitors a given pid and $! is the last command pid.



                                                                                    If you issue dd with sudo, you have to too with progress too:



                                                                                    sudo dd if=/dev/sda of=file.img &
                                                                                    sudo progress -m
                                                                                    # with no -p, this will wait for all coreutil commands to finish
                                                                                    # but $! will give the sudo command's pid





                                                                                    share|improve this answer




























                                                                                      1














                                                                                      You can watch the progress of any coreutils program using progress - Coreutils Progress Viewer.



                                                                                      It can monitor:



                                                                                      cp mv dd tar cat rsync grep fgrep egrep cut sort md5sum sha1sum sha224sum sha256sum sha384sum sha512sum adb gzip gunzip bzip2 bunzip2 xz unxz lzma unlzma 7z 7za zcat bzcat lzcat split gpg



                                                                                      You can see the manpage



                                                                                      You can use it in a seperate terminal window while the command is running or launch it with the dd command:



                                                                                      dd if=/dev/sda of=file.img & progress -mp $!


                                                                                      Here & forks the first command and continues immediately instead of waiting until the command ends.



                                                                                      The progress command is launched with: -m so it waits until the monitored process ended, -p so it monitors a given pid and $! is the last command pid.



                                                                                      If you issue dd with sudo, you have to too with progress too:



                                                                                      sudo dd if=/dev/sda of=file.img &
                                                                                      sudo progress -m
                                                                                      # with no -p, this will wait for all coreutil commands to finish
                                                                                      # but $! will give the sudo command's pid





                                                                                      share|improve this answer


























                                                                                        1












                                                                                        1








                                                                                        1







                                                                                        You can watch the progress of any coreutils program using progress - Coreutils Progress Viewer.



                                                                                        It can monitor:



                                                                                        cp mv dd tar cat rsync grep fgrep egrep cut sort md5sum sha1sum sha224sum sha256sum sha384sum sha512sum adb gzip gunzip bzip2 bunzip2 xz unxz lzma unlzma 7z 7za zcat bzcat lzcat split gpg



                                                                                        You can see the manpage



                                                                                        You can use it in a seperate terminal window while the command is running or launch it with the dd command:



                                                                                        dd if=/dev/sda of=file.img & progress -mp $!


                                                                                        Here & forks the first command and continues immediately instead of waiting until the command ends.



                                                                                        The progress command is launched with: -m so it waits until the monitored process ended, -p so it monitors a given pid and $! is the last command pid.



                                                                                        If you issue dd with sudo, you have to too with progress too:



                                                                                        sudo dd if=/dev/sda of=file.img &
                                                                                        sudo progress -m
                                                                                        # with no -p, this will wait for all coreutil commands to finish
                                                                                        # but $! will give the sudo command's pid





                                                                                        share|improve this answer













                                                                                        You can watch the progress of any coreutils program using progress - Coreutils Progress Viewer.



                                                                                        It can monitor:



                                                                                        cp mv dd tar cat rsync grep fgrep egrep cut sort md5sum sha1sum sha224sum sha256sum sha384sum sha512sum adb gzip gunzip bzip2 bunzip2 xz unxz lzma unlzma 7z 7za zcat bzcat lzcat split gpg



                                                                                        You can see the manpage



                                                                                        You can use it in a seperate terminal window while the command is running or launch it with the dd command:



                                                                                        dd if=/dev/sda of=file.img & progress -mp $!


                                                                                        Here & forks the first command and continues immediately instead of waiting until the command ends.



                                                                                        The progress command is launched with: -m so it waits until the monitored process ended, -p so it monitors a given pid and $! is the last command pid.



                                                                                        If you issue dd with sudo, you have to too with progress too:



                                                                                        sudo dd if=/dev/sda of=file.img &
                                                                                        sudo progress -m
                                                                                        # with no -p, this will wait for all coreutil commands to finish
                                                                                        # but $! will give the sudo command's pid






                                                                                        share|improve this answer












                                                                                        share|improve this answer



                                                                                        share|improve this answer










                                                                                        answered Jul 22 '18 at 20:06









                                                                                        labsinlabsin

                                                                                        452212




                                                                                        452212























                                                                                            1














                                                                                            Just in case anybody from CentOS land happens to find this thread...



                                                                                            The 'status=progress' option works with CentOS 7.5 and 7.6



                                                                                            The answer above by @davidDavidson implies the feature was newly added in Coreutils 8.24.




                                                                                            Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.




                                                                                            This may be the case, but CentOS might not be following the same versioning scheme.



                                                                                            The version of Coreutils that comes with CentOS 7.6.1810 is:



                                                                                            coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts


                                                                                            And the version of dd that is installed is:



                                                                                            [root@hostname /]# dd --version
                                                                                            dd (coreutils) 8.22
                                                                                            Copyright (C) 2013 Free Software Foundation, Inc.
                                                                                            License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
                                                                                            This is free software: you are free to change and redistribute it.
                                                                                            There is NO WARRANTY, to the extent permitted by law.

                                                                                            Written by Paul Rubin, David MacKenzie, and Stuart Kemp.


                                                                                            This shows versions 8.22.



                                                                                            However, I have tested the 'status=progress' with dd on both CentOS 7.5 and CentOS 7.6 (both with version 8.22 of Coreutils) and it functions properly.



                                                                                            I don't know why RedHat chooses to use such an old version of Coreutils but the functionality does exist with 8.22.






                                                                                            share|improve this answer




























                                                                                              1














                                                                                              Just in case anybody from CentOS land happens to find this thread...



                                                                                              The 'status=progress' option works with CentOS 7.5 and 7.6



                                                                                              The answer above by @davidDavidson implies the feature was newly added in Coreutils 8.24.




                                                                                              Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.




                                                                                              This may be the case, but CentOS might not be following the same versioning scheme.



                                                                                              The version of Coreutils that comes with CentOS 7.6.1810 is:



                                                                                              coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts


                                                                                              And the version of dd that is installed is:



                                                                                              [root@hostname /]# dd --version
                                                                                              dd (coreutils) 8.22
                                                                                              Copyright (C) 2013 Free Software Foundation, Inc.
                                                                                              License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
                                                                                              This is free software: you are free to change and redistribute it.
                                                                                              There is NO WARRANTY, to the extent permitted by law.

                                                                                              Written by Paul Rubin, David MacKenzie, and Stuart Kemp.


                                                                                              This shows versions 8.22.



                                                                                              However, I have tested the 'status=progress' with dd on both CentOS 7.5 and CentOS 7.6 (both with version 8.22 of Coreutils) and it functions properly.



                                                                                              I don't know why RedHat chooses to use such an old version of Coreutils but the functionality does exist with 8.22.






                                                                                              share|improve this answer


























                                                                                                1












                                                                                                1








                                                                                                1







                                                                                                Just in case anybody from CentOS land happens to find this thread...



                                                                                                The 'status=progress' option works with CentOS 7.5 and 7.6



                                                                                                The answer above by @davidDavidson implies the feature was newly added in Coreutils 8.24.




                                                                                                Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.




                                                                                                This may be the case, but CentOS might not be following the same versioning scheme.



                                                                                                The version of Coreutils that comes with CentOS 7.6.1810 is:



                                                                                                coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts


                                                                                                And the version of dd that is installed is:



                                                                                                [root@hostname /]# dd --version
                                                                                                dd (coreutils) 8.22
                                                                                                Copyright (C) 2013 Free Software Foundation, Inc.
                                                                                                License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
                                                                                                This is free software: you are free to change and redistribute it.
                                                                                                There is NO WARRANTY, to the extent permitted by law.

                                                                                                Written by Paul Rubin, David MacKenzie, and Stuart Kemp.


                                                                                                This shows versions 8.22.



                                                                                                However, I have tested the 'status=progress' with dd on both CentOS 7.5 and CentOS 7.6 (both with version 8.22 of Coreutils) and it functions properly.



                                                                                                I don't know why RedHat chooses to use such an old version of Coreutils but the functionality does exist with 8.22.






                                                                                                share|improve this answer













                                                                                                Just in case anybody from CentOS land happens to find this thread...



                                                                                                The 'status=progress' option works with CentOS 7.5 and 7.6



                                                                                                The answer above by @davidDavidson implies the feature was newly added in Coreutils 8.24.




                                                                                                Version 8.24 of the GNU coreutils includes a patch for dd introducing a parameter to print the progress.




                                                                                                This may be the case, but CentOS might not be following the same versioning scheme.



                                                                                                The version of Coreutils that comes with CentOS 7.6.1810 is:



                                                                                                coreutils-8.22-23.el7.x86_64 : A set of basic GNU tools commonly used in shell scripts


                                                                                                And the version of dd that is installed is:



                                                                                                [root@hostname /]# dd --version
                                                                                                dd (coreutils) 8.22
                                                                                                Copyright (C) 2013 Free Software Foundation, Inc.
                                                                                                License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
                                                                                                This is free software: you are free to change and redistribute it.
                                                                                                There is NO WARRANTY, to the extent permitted by law.

                                                                                                Written by Paul Rubin, David MacKenzie, and Stuart Kemp.


                                                                                                This shows versions 8.22.



                                                                                                However, I have tested the 'status=progress' with dd on both CentOS 7.5 and CentOS 7.6 (both with version 8.22 of Coreutils) and it functions properly.



                                                                                                I don't know why RedHat chooses to use such an old version of Coreutils but the functionality does exist with 8.22.







                                                                                                share|improve this answer












                                                                                                share|improve this answer



                                                                                                share|improve this answer










                                                                                                answered Dec 20 '18 at 16:36









                                                                                                J HaussJ Hauss

                                                                                                211




                                                                                                211

















                                                                                                    protected by Community Mar 13 '17 at 5:43



                                                                                                    Thank you for your interest in this question.
                                                                                                    Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



                                                                                                    Would you like to answer one of these unanswered questions instead?



                                                                                                    Popular posts from this blog

                                                                                                    GameSpot

                                                                                                    日野市

                                                                                                    Tu-95轟炸機