VI or Vim file encryption and garbled Processing

Source: Internet
Author: User

 

When you use VI or Vim to edit a file, you should use WQ or X to exit when saving the disk, but sometimes you may accidentally press X,
At this time, the system will prompt:
Enter encryption key:

If you have not carefully read the prompt, for example, continue to input: X,
Enter encryption key :*
Enter same key again :*

In fact, this file is encrypted. You will be asked to enter the key next time you open the file, for example:
[Oracle @ ts01 admin] $ Vim $ ORACLE_HOME/sqlplus/admin/glogin. SQL

 

 

 

Enter encryption key :*

--
-- Copyright (c) Oracle Corporation 1988,200 0. All rights reserved.
--
-- Name
-- Glogin. SQL
--
-- Description
-- SQL * Plus global login Startup File.
--
-- Add any sqlplus commands here that are to be executed when a user
-- Starts SQL * Plus on your system
--
-- Usage
-- This script is automatically run when SQL * Plus starts
--

-- For backward compatibility
Set pagesize 14
Set sqlpluscompatibility 8.1.7

-- Used by trusted Oracle
Column rowlabel format A15

-- Used for the show errors command
Column line/COL format A8
Column error format a65 word_wrapped

-- Used for the show SGA command
Column name_col_plus_show_sga format A24

-- Defaults for show Parameters
Column name_col_plus_show_param format A36 heading name
Column value_col_plus_show_param format A30 heading Value

-- Defaults for set autotrace explain report
Column id_plus_exp format 990 heading I
Column parent_id_plus_exp format 990 heading P
Column plan_plus_exp format A60
Column object_node_plus_exp format A8
Column other_tag_plus_exp format A29
Column other_plus_exp format A44

Set linesize 132
Set serveroutput on size 1000000
Set timing on
-- Set trimspool on
Sets long 5000
Set linesize 132
Set pagesize 9999
Column plan_plus_exp format a80
Column global_name new_value gname
Set termout off
Define gname = idle
Column global_name new_value gname

Define gname = idle
Column global_name new_value gname
Select lower (User) | '@' | substr (global_name, 1,
Decode (dot, 0, length (global_name), dot-1) global_name
From (select global_name, instr (global_name, '.') Dot from global_name );
Set sqlprompt '& gname>'
Set termout on

[Oracle @ ts01 admin] $

Otherwise, garbled characters are displayed.

 

To access the password, follow these steps:
Vim File
Enter encryption key: enter the password
: Set key =
: W!

 

For example:
[Oracle @ ts01 admin] $ Vim $ ORACLE_HOME/sqlplus/admin/glogin. SQL

 

 

 

Enter encryption key: * enter the password

........ Original file text

: Set key =
: W! Disk Storage

Now the password restriction is removed.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.