Skip to content

Tar with a progress bar

Michael Watts edited this page Jan 15, 2016 · 5 revisions

Extracting

Using pv we can add a progress bar to tar extractions.

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.

pv is not installed by default on most systems so on OSX can install with brew, so run brew install pv and on linux use apt-get install pv or yum install pv.

Once installed run: pv archive.tar.gz | tar -x -C .

Creating

Creation is a little more complicated, haven't yet tested but found this post on SuperUser

tar cf - /folder-with-big-files -P | pv -s $(du -sb /folder-with-big-files | awk '{print $1}') | gzip > big-files.tar.gz

SSH

2 Best practices when logging in remotely to linux machine

WARGAMES

Clone this wiki locally