Skip to content

Instantly share code, notes, and snippets.

@stevehenderson
Last active November 14, 2023 15:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevehenderson/56ef640e500aaa50df0c4d0a4130554e to your computer and use it in GitHub Desktop.
Save stevehenderson/56ef640e500aaa50df0c4d0a4130554e to your computer and use it in GitHub Desktop.
Linux command to tar, pgp encrypt, and split a file

Encrypt:

tar -cJvpf - inputdirectory/ | gpg --symmetric --cipher-algo aes256 | split -d -b 100m - outputfile.tar.xz.gpg

Decrypt:

cat outputfile.tar.xz.gpg.* | gpg -d | tar -xJvpf -

Ack: oksage @ askubuntu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment