Skip to content

Instantly share code, notes, and snippets.

@deckerego
Created December 6, 2013 17:14
Show Gist options
  • Save deckerego/7828557 to your computer and use it in GitHub Desktop.
Save deckerego/7828557 to your computer and use it in GitHub Desktop.
Compress and encrypt a tarball in a single line
gpg -d archive.DATE.tar.bz2.gpg | tar xvj
tar c -O -C "$HOME" directory_to_archive | bzip2 -c | gpg -e -r your_email@gpg_keyring -o "archive.`date +%Y%m%d_%H%M`.tar.bz2.gpg" -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment