Skip to content

Instantly share code, notes, and snippets.

@Eddy-Barraud
Last active November 22, 2020 10:17
Show Gist options
  • Save Eddy-Barraud/1583532910760f2942133b03863fd758 to your computer and use it in GitHub Desktop.
Save Eddy-Barraud/1583532910760f2942133b03863fd758 to your computer and use it in GitHub Desktop.
Compress using fast ZSTD and show progress with dialog
#!/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
#!/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