Encrypt & Secure Your Files Using vi Editor

by manojgumber

[tweetmeme service=”bit.ly” source=”LeisureHoursWP” ]

Do you know that you can encrypt your source code files and other text files using vi editor? Isn’t vi editor wonderful.

It is very simple. While creating new file which you intend to encrypt

leisurehours@wordpress-laptop : ~ $ vi -x file1.txt

To encrypt an existing file , open it with vi using -x option

leisurehours@wordpress-laptop : ~ $ vi -x file1.txt

vi editor will now ask for password twice. Whenever you will open the file again with vi editor, it will ask for password to decrypt the file. When opened using other editors , file will show only garbage text.



Advertisements