How to Monitor Progress of (Copy/Backup/Compress) Data using ‘pv’ Command

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

24 Responses

  1. kk says:

    Is there any reason why pv might slow things down? See example below:

    time pigz -dk MYSQL_BACKUP_2018-06-08-17\:26\:15.sql.gz | mysql -pmetatest
    Warning: Using a password on the command line interface can be insecure.

    real 0m29.868s
    user 0m5.108s
    sys 0m2.020s

    time pv MYSQL_BACKUP_2018-06-08-17\:26\:15.sql.gz | pigz -d | mysql -pmetatest
    Warning: Using a password on the command line interface can be insecure.
    215MiB 0:01:16 [2.81MiB/s] [========================================================================>] 100%

    real 1m16.837s
    user 0m13.868s
    sys 0m2.392s

    • Aaron Kili says:


      This is quite interesting! We have to investigate this further, to come up with a solid conclusion. Many thanks for sharing this concern.

      • xrkr says:

        Hello Aaron/Kk,

        Was there any conclusion? We observed a similar lag while using pv command to transfer the files over the p2p network. The pv command didn’t return to the command prompt quickly while over the LAN it was quick.

  2. Ronald Trumpet says:

    >> On FreeBSD Linux

    Nice joke.

  3. gosho says:

    Formating hard disk with dd command using pv:

    # dd if=/dev/zero | pv -pbtr -s 120033041920 | dd of=/dev/sdX

    note: 120033041920 bytes is exact size of the disk, get your with fdisk -l
    sdX is the disk you want to dd, change X with your letter- a, b, c…

    • Ravi Saive says:


      Thanks for the useful tip about dd command with pv, sounds great, will create a short article on same. Else, you can also create a short 300 words article on same, if you want we will publish the article under you name in Tecmint..

  4. Yoander says:

    please could you tell us what is the meaning of: -t, -e, -r and -b options?

  5. Alagirisamy says:

    I am getting the below error while copying 4 Gb files from workstation to pendrive

    [[email protected] home]# ls
    Alagiri CentOS-7-x86_64-DVD-1602-01.iso Dvois lost+found
    [[email protected] home]# pv CentOS-7-x86_64-DVD-1602-01.iso > /media/ammu/CentOS-7-x86_64-DVD-1602-01.iso
    pv: write failed: File too large=================================================================================> ] 97% ETA 0:00:26
    You have new mail in /var/spool/mail/root

  6. R says:

    New version of coreutils (8.24) adding a status progress to dd tool:

    Usage on Xubuntu 15.10:

    Open terminal shell and type these commands:

    tar -xf coreutils-8.24.tar.xz
    cd coreutils-8.24
    ./configure && make -j $(nproc)

    Run dd as root:

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

    You will see: Bytes, Seconds and Velocity (Bytes/seconds)

    To check versions of dd:


    dd –version

    New (cd coreutils-8.24/src):

    ./dd –version

  7. Tobi says:

    Check the network speed between two computers with ‘netcat’ and without utilizing a harddisk:
    At the first computer do a:
    netcat -l -p 1234 | pv > /dev/null
    Then go to the second computer and type:
    cat /dev/zero | pv | netcat ip_of_first_computer 1234
    Helped me to identify slow network switches.

  8. Emiliano says:

    Another GREAT use of “pv” is using it with “dd”.
    works great for me.

    dd if=/dev/sda1 | pv |dd of=/home/user/backup.iso

    Definitely it’s a “must” for “dd”. This process always take a long time to finish.

    Great article.

  9. Josmell Jimenez says:

    Excellent as always, great and easy explanation for every newbie and advanced linux user.

    Keep it up!

  10. Jon Loveless says:

    excellent tutorial on pv. I loved the video examples. It just doesn’t any more clear than that! thanks.

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.