O'Reilly's PGP Book Logo

Phil Zimmermann's PGP
Usage Examples

PGP Advanced Usage Examples

Mail a user your public key
pgp -kxaf userid | mailx -s "pgp public key" user@host.company.com

Encrypt, sign and send in one command
pgp -seatf recipient < filename | mail user@host.company.com

View user's key fingerprint
pgp -kvc userid

Encrypting for multiple recipients
pgp -es recipient1 recipient2

Encode files using PGP's Radix-64 algorithm (comprable to uuencode, but better)
pgp -a filename

Encrypt/Sign for PGP ignorant mailers (add to .exrc)
map ^P :w^M :!pgp -sat %^M :!mv -f %.asc %^M :vi %^M


PGP Output File Sizes

new_user$ pgp -e bash_man code
new_user$ pgp -se bash_man code
new_user$ pgp -seat +ARMORLINES=0 bash_man code -o bash_man.pgp_signed
new_user$ pgp -e pgp262s.tar.gz
new_user$ pgp -se pgp262s.tar.gz -o ./pgp262s.tar.gz.pgp_signed
new_user$ pgp -seat +ARMORLINES=0 pgp262s.tar.gz -o ./pgp262s.tar.gz.pgp_signed
new_user$ pgp -c pgp262s.tar.gz -o ./pgp262s.tar.gz_conventional.pgp
new_user$ ls
-rw-r--r--   1 code     code       196455 Jul 17 18:32 bash_man
-rw-------   1 code     code        57164 Jul 17 18:32 bash_man.pgp
-rw-------   1 code     code        57465 Jul 17 18:33 bash_man.pgp_signed
-rw-------   1 code     code        78211 Jul 17 18:34 bash_man.pgp_signed.asc
-rw-r--r--   1 root     root       548053 Jul 13 08:25 pgp262s.tar.gz
-rw-------   1 code     code       548093 Jul 17 18:42 pgp262s.tar.gz_conventional.pgp
-rw-------   1 code     code       548235 Jul 17 18:27 pgp262s.tar.gz.pgp
-rw-------   1 code     code       548387 Jul 17 18:27 pgp262s.tar.gz.pgp_signed
-rw-------   1 code     code       742685 Jul 17 18:30 pgp262s.tar.gz.pgp_signed.asc


Last Modified: 17 July 1996

St. Louis Unix Users Group - Linux SIG