Vi / Vim is a powerful tool and for Linux enthusiast, this is a must tool to learn.
Text file or basic editing in command line is quite important, to take notes, create a script, store text data or just anything that needs editing or creating via command line or terminal.
How to create a text file in command line and put a password or encrypt the file?
Text file is readable via lot of tools, cat, less, more, grep or any text editing files.
One way to protect the file or its content is to encrypt the file.
Screenshot below shows, how to create the file and encrypt it.
Example: vi -x TestPasswordEncrypt.txt
Another way to create a password or encrypt the file is to do it via the "vi" window.
On "vi", press "Esc" key and type :X (it's colon and capital "X"). After typing the commands, the system will ask for a password/encryption key. It will ask for a password twice.
After entering the key, it will go back to the same screen where you can see your file. Type :x or :wq to save and exit the file.
To confirm, whether file is encrypted or not. Do a "cat" to trad the file or open the file using vi or vim.
Example below shows "cat" command and the file is not readable.
Cheers! Take care. Till next Time. Enjoy Linux! Keep exploring..
Stay safe! and Keep things up!
Do ASAP, Always Say A Prayer...
Practice O.T.G. = Obedience To God
Make time for Prayer and Meditation.
================================
Free Android Apps:
Click links below to find out more:
Free Android Apps:
Click links below to find out more:
Excel Keyboard guide:
https://play.google.com/store/apps/details?id=chrisjoms.myexcelapplicationguide
Heaven's Dew Fall Prayer app for Android :
https://play.google.com/store/apps/details?id=soulrefresh.beautiful.prayer
Catholic Rosary Guide for Android:
Pray the Rosary every day, countless blessings will be showered upon your life if you recite the Rosary faithfully.
https://play.google.com/store/apps/details?id=com.myrosaryapp
Divine Mercy Chaplet Guide (A Powerful prayer) BFF = Be Filled Faith:
Excellent content, Thanks for sharing this. It's pretty nice and very helpful content in this article. Leanpitch provides online training in Product Owner, everyone can use it wisely. ICP-ATF
ReplyDelete