I've written a little script for my Clonezilla USB stick which will allow me to quickly back everything up without entering any options by simply running the script.
Next, I'd like to store my public GPG key on the stick and add some encryption to my backups like so:
find . -maxdepth 1 -type f -not -iname "*.gpg" | while read file ; do gpg --encrypt-using-key-file "/path/to/my/keyfile" "$file" rm "$file" done
What is the way to properly encrypt files using a public GPG keyfile, ensuring that it doesn't prompt for user input? How would I actually do this?