compress multiple files and encrypt using gpg

tar -cv folder | gpg -e -r recipientGpgKey -o output.tar.gpg

to decompress the above file:(prepare recipientGpgKey passphrase )

gpg --output output.tar --decrypt output.tar.gpg

you must specify –secret-keyring pathtokeyring if secret key is not available on the machine