PDA

View Full Version : How to tar big folder with progress bar



Fli
05-04-2014, 02:34 PM
How long it will take to tar folder in linux?

12GB alot of files tar.gz took me 2 hours

If one want to tar.gz and see progress bar, one can install software pv (pv - monitor the progress of data through a pipe)

yum install pv -y

and then do command like:

tar cf - /backup/incremental -P | pv -s $(du -sb /backup/incremental | awk '{print $1}') | gzip > incremental_$(date +"%Y_%m_%d").tar.gz

(where /backup/incremental is folder one want to backup..)