In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Linux encrypts and decrypts files with vim/vi
First, use vim/vi encryption:
Advantages: after encryption, if you don't know the password, you can't see the plaintext, including root users.
Disadvantages: obviously let others know the encryption, it is easy for others to destroy the encrypted files, including content destruction and deletion
Vi editor I believe everyone is familiar with it, there is a command in vi to encrypt files, for example:
1) first, create an experimental file text.txt under the root home directory / root/:
[root@www ~] # vim/vi text.txt
2) enter edit mode, press ESC after typing, then enter: X (uppercase X), and enter enter
3) at this point, the system prompts you to enter your password twice, as follows:
Enter the password: *
Please enter again: *
4) exit after saving, and now this file is encrypted
5) use cat or more to view the contents of the file and show it as garbled; if you re-edit the file with vim/vi, you will be prompted for a password, and if you enter an incorrect password, it will also be displayed as garbled!
Note: after the file is encrypted, don't forget the password!
Decrypt files encrypted with vi (provided you know the encrypted password):
1) to open a file such as text.txt with vim/vi, enter the correct password, and then set the password to empty when editing by entering the following command:
: set key=
Then enter directly, and after saving the file, the file has been decrypted.
2) or this is fine:
Use the ": X" command after opening the file correctly, and then give an empty password. Save with "wq!" Save.
The effect of the two methods is actually the same.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
04. Use vbs script to import accounts in bulk
© 2024 shulou.com SLNews company. All rights reserved.