Unix quick tip - tar with progress

tar with progress bar

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

to install pv

first we need to add the repo

create

/etc/yum.repos.d/ivarch.repo:
[ivarch]
name=RPMs from ivarch.com
baseurl=http://www.ivarch.com/programs/rpms/$basearch/
enabled=1
gpgcheck=1

import public key
rpm --import http://www.ivarch.com/personal/public-key.txt

yum install pv -y


trying it out


Comments

Popular posts from this blog

MongoDB tip: 4 ways to modify replica set configuration

MongoDB Quick Note: BI Connector Issue

MongoDB Tips: Kill long running processes