Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kurtis318/ae30fde88c3e234d46ef959841af8e10 to your computer and use it in GitHub Desktop.
Save kurtis318/ae30fde88c3e234d46ef959841af8e10 to your computer and use it in GitHub Desktop.
How to use pv command with progress bar
I found a nice package called pv that implements a command line progress bar to use in copying files and creating tar files.
Here is the URL I found that describes the pv command:
https://www.tecmint.com/monitor-copy-backup-tar-progress-in-linux-using-pv-command/
Here are some example useage of pv.
# pv opensuse.vdi > /tmp/opensuse.vdi
# pv /var/log/syslog | zip > syslog.zip
# pv -p /etc/hosts | wc
# tar -czf - ./Downloads/ | (pv -p --timer --rate --bytes > backup.tgz)
# tar -czf - ./Documents/ | (pv -n > backup.tgz) 2>&1 | dialog --gauge "Progress" 10 70
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment