# 生成新的公私鑰
gpg --gen-key

# clearsigned 文件
gpg --clearsign doc

# 匯入 Public Key
gpg --import key.asc 

# Turn a directory into a file 
tar czf docs.tar.gz docs/

# 加密
gpg --encrypt --recipient xxx@mail.com ~/xxx/xxx.txt

參考連結:

The GNU Privacy Handbook ,