gpg -d my-file.txt.gpg
gpg: AES encrypted data
gpg: gpg-agent is not available in this session
Enter passphrase:
解密完成後會提示檔案已解密,並顯示解密後的檔案內容
1
2
gpg: encrypted with 1 passphrase
caloskao.org
可以搭配參數 -o 直接將解密後的內容輸出至檔案
1
2
3
4
5
6
gpg -o my-file.txt.decryped my-file.txt.gpg
gpg: AES encrypted data
gpg: gpg-agent is not available in this session
gpg: encrypted with 1 passphrase
cat my-file.txt.decryped
caloskao.org