encrypting text files in-place

Robert Connolly robert at linuxfromscratch.org
Sun Jun 24 14:46:20 PDT 2007

This sortof works:
vi -n
:%! gpg -d foo.gpg


:%! gpg -c --cipher-algo AES256 -o foo.gpg


With '-n' there's no swap file, and no file locking. So don't open the same 
file with two editors at the same time, and changes are lost if there's a 

I say 'sortof' works because:
gpg: AES256 encrypted data
gpg: encrypted with 1 passphrase

is added to the top of the file, because these lines are outputted by gpg.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20070624/ab1ee0f9/attachment.sig>

More information about the hlfs-dev mailing list