Oct 2015 - Pipe Viewer

From Jacksonville Linux Users Group
Jump to: navigation, search
  • Copy a file using pv and watch its progress
pv sourcefile > destfile
  • You have a file called “access.log” and it’s a few gigabytes large. You start to compress into a gunzip archive (.gz):
gzip -c access.log > access.log.gz
  • You can use PV to see exactly how long it will take for your file to be compressed:
pv access.log | gzip > access.log.gz
  • monitor the progress of dd
sudo dd if=/dev/sdc bs=4096 | pv -s 2G | sudo dd bs=4096 of=~/USB_BLACK_BACKUP.IMG