19
Oct

pv - Progress monitoring

   Posted by: admin   in Mẹo vặt của hiếu râu

  • To turn on the display bar, use the -p option.
  • To view the elapsed time, use the –timer option.
  • To turn on ETA timer which tries to guess how long it will take before completion of an operation, use the –eta option. The guess is based on previous transfer rates and the total data size.
  • To turn on a rate counter use the –rate option.
  • To display the total amount of data transferred so far, use the –bytes option.
  • To display progress inform of integer percentage instead of visual indication, use the -n option. This can be good when using pv with the dialog command to show progress in a dialog box.
copy file
# pv source > /tmp/dest
zip a file
#pv /var/log/syslog | zip > syslog.zip
tar dir
# tar -czf - ./Downloads/ | (pv -p --timer --rate --bytes > backup.tgz)
tar with dialog
# tar -czf - ./Documents/ | (pv -n > backup.tgz) 2>&1 | dialog --gauge "Progress" 10 70
This entry was posted on Wednesday, October 19th, 2022 at 12:14 am and is filed under Mẹo vặt của hiếu râu. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed at this time.