Skip to content

Instantly share code, notes, and snippets.

@emadshanab
Forked from olivierpierre/pigzc.sh
Last active December 21, 2020 17:09
Show Gist options
  • Save emadshanab/95d4ac5fb9bc8ac8036cc091f5ff88c6 to your computer and use it in GitHub Desktop.
Save emadshanab/95d4ac5fb9bc8ac8036cc091f5ff88c6 to your computer and use it in GitHub Desktop.
Compress a directory tree into a tarball using pigz
Compress a directory tree into a tarball using pigz
#!/bin/sh
if [ "$1" == "" ]; then
echo "Usage: $0 <folder to compress>"
exit
fi
NAME=`basename $1`
tar -c --use-compress-program=pigz -f $NAME.tar.gz $NAME
------------------------------------------------------------------------------
Uncompress a directory tree contained in a tarball with pigz
#!/bin/sh
if [ "$1" == "" ]; then
echo "Usage: $0 <file to uncompress>"
exit
fi
pigz -dc $1 | tar xf -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment