Method 1: press ctrl + backspace while using the backspace key.
Method 2: Add the following content to any startup script:
[Oracle @ night ~] $ Tail-1. bash_profile
Stty erase ^ H
Stty indicates set tty, which is mainly used to check and modify the communication parameters of the currently registered terminal.
The above two methods solve the backspace key problem. If I want to call back the commands executed in sqlplus
Method 3: You can use the backspace key to call back commands executed in sqlplus.
To download rlwrap from a third-party tool, see
After pressure installation is complete
[Oracle @ night u01] $ ls
App install rlwrap
[Oracle @ night u01] $ cd rlwrap/
[Oracle @ night rlwrap] $ ls
Bin share
[Oracle @ night rlwrap] $
[Oracle @ night rlwrap] $ cd bin/
[Oracle @ night bin] $ ll
Total 168
-Rwxr-xr-x 1 oracle oinstall 165717 07-25 rlwrap
[Oracle @ night bin] $
Add to PATH
[Oracle @ night ~] $ Vim. bash_profile
Export PATH = $ PATH: $ ORACLE_BASE: $ ORACLE_HOME/bin:/u01/rlwrap/bin
Effective immediately
[Oracle @ night ~] $ Source. bash_profile
[Oracle @ night ~] $ Echo $ PATH
/Usr/kerberos/bin:/usr/local/bin:/usr/bin:/home/oracle/bin:/u01/app/oracle: /u01/app/oracle/product/bin:/home/oracle/bin:/u01/app/oracle:/u01/app/oracle/product/bin: /u01/rlwrap/bin
[Oracle @ night ~] $
[Oracle @ night ~] $ Rl
Rlatopam rletopnm rlog rlogin rlwrap
[Oracle @ night ~] $ Rl
Use
[Oracle @ night ~] $ Rlwrap sqlplus/nolog
SQL * Plus: Release 11.2.0.1.0 Production on Thu Jul 25 23:37:55 2013
Copyright (c) 1982,200 9, Oracle. All rights reserved.
SQL> conn sys/as sysdba
Enter password:
Connected.
SQL>
You can also use the command alias
[Oracle @ night ~] $ Alias sqlplus = 'maid sqlplus'
[Oracle @ night ~] $ Alias
Alias l. = 'LS-d. * -- color = tty'
Alias ll = 'LS-l -- color = tty'
Alias ls = 'ls -- color = tty'
Alias sqlplus = 'maid sqlplus'
Alias vi = 'vim'
Alias which = 'Alias |/usr/bin/which -- tty-only -- read-alias -- show-dot -- show-tilde'
[Oracle @ night ~] $ Sqlplus/nolog
SQL * Plus: Release 11.2.0.1.0 Production on Thu Jul 25 23:39:36 2013
Copyright (c) 1982,200 9, Oracle. All rights reserved.
SQL> conn/as sysdba
Connected.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0-Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
To take effect next time, add it to the startup script.