12/27/2023 0 Comments Keep old file after encryptoIn the example below, we see what this command tells you when a file is encrypted and when it is not. To determine whether a file is encrypted by vim, you can run the file command. Many other tools are available to encrypt files, but this technique requires nothing more than vim and whatever method you use to remember your keys. I feel the need to put my deepest darkest secret into a text file on my Linux After that, your file will be back in its unencrypted form. Then enter :X but, when prompted to enter an encryption key again (twice), simply press the Enter key: Enter encryption key: Note the use of a capitalized X this time: $ vim -X mysecret If, at some point, you are ready to share your deep dark secret with others, you can reverse the file encryption as simply as you invoked it in the first place. Įnd your vim session with the usual :wq and the file will remain encrypted. But a penguin? That's a different story! So here goes. While this likely isn't common practice, I'm not sure that I can trustĪnyone with it. The content should again be displayed in plain text. Once you are ready to read your file again or continue with your detailed expression of your deep dark secret, use the vim command again and provide the password when prompted. To write out encrypted content, simply save the file as you would normally do with vim. Once vim has then opened your file, it looks normal and you can continue editing or adding details to your deep dark secret should you want to do so or simply move on to writing out the file in encrypted form. Instead, each character will be displayed as an asterisk. Note that the password will not be displayed as you type it. The vim editor will immediately ask for an encryption key.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |