Skip to content

Instantly share code, notes, and snippets.

@J3RN
Created January 14, 2018 01:13
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 J3RN/a230c94febb5068ec82de911bb0ebeb4 to your computer and use it in GitHub Desktop.
Save J3RN/a230c94febb5068ec82de911bb0ebeb4 to your computer and use it in GitHub Desktop.
A simple script I use to backup my flashdrive
#!/bin/bash
# Usage: ./backup.sh <path to directory to archive> <GPG user>
tar -C $1 -c . | gpg --recipient $2 -e > $(date -Iminutes | tr -d ':').tar.gz.gpg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment