Last active
November 22, 2020 10:17
-
-
Save Eddy-Barraud/1583532910760f2942133b03863fd758 to your computer and use it in GitHub Desktop.
Compress using fast ZSTD and show progress with dialog
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
#!/bin/bash | |
filePath=$(wslpath "$1") | |
fileName=$(basename $filePath) | |
#cd $filePath/.. | |
( pv -n $fileName | tar xf - -I"zstd -T0" ) 2>&1 | dialog --gauge "Progress..." 6 50 |
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
#!/bin/bash | |
folder="${PWD##*/}" | |
cd .. | |
( tar -cf - "$folder" | pv -n -s $(du -sb "$folder" | awk '{print $1}') | zstd -T8 - -o "$folder.zst" ) 2>&1 | dialog --gauge "Progress..." 6 50 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment