Created
April 4, 2017 02:33
-
-
Save pavlov99/a8b7045496776aff6d58607806a12d6c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install linux pipe viewer and optional dialog | |
sudo apt-get install dialog | |
# Archive: | |
tar cf - /folder-with-big-files -P | pv -s $(du -sb /folder-with-big-files | awk '{print $1}') | gzip > big-files.tar.gz | |
# OSX: | |
tar cf - /folder-with-big-files -P | pv -s $(($(du -sk /folder-with-big-files | awk '{print $1}') * 1024)) | gzip > big-files.tar.gz | |
# Unarchive: | |
pv file.tgz | tar xzf - -C target_directory | |
# Unarchive with dialog (nicer command line view) | |
(pv -n file.tgz | tar -xzf - -C target_directory ) 2>&1 | dialog --gauge "Extracting file..." 6 50 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment