PS: Recently because of work need amateur in learning Oracle, through the SECURECRT or Putty SSH client to telnet to the Linux Oracle Sqplus, after a typo, press backspace key or DEL key Delete, will appear ^ h or other messy characters, feel very awkward not accustomed to, although you can use the Ctrl+backspace key combination to achieve the deletion function, but seriously affect the efficiency. Google, finally a perfect solution to this problem. Summary records are as follows, this is the most complete summary of this issue:
Messy characters like figure:
First, the solution in the SECURECRT Terminal: (Imperfect)
In the SECURECRT terminal, there are two temporary ways to remove characters if you want to use backspace under Sqlplus.
The first is to redefine ^h using the Stty command, which can be executed Stty erase ^h before using Sqlplus, or it can be placed in the Oracle user's. bash_profile file.
Introduction to the Stty command:
UNIX or Linux has a stty command, which is to print or change the terminal (terminal) settings.
Common parameters:
-A--all print out all existing settings with human readable form
-G--save Print out all existing settings with Stty readable form
--help Help
--version version
View current Stty existing settings, as shown in figure:
The second is to use SECURECRT settings, and in the terminal->emulation->mapped keys of the session properties, select BACKSPACE sends delete or delete sends One of the backspace and make sure that the other is not selected.
Another problem is the use of the up and down arrows in the sqlplus under Bash shell to not display the up and down commands, but only to display ^[[a, this problem can be installed rlwrap this tool to solve!
Second, the use of rlwrap tools to solve: (perfect)
1. Install Rlwrap and ReadLine Library
CentOS can be installed directly with Epel Yum source, as follows:
(1) RHEL/CENTOS/SL Linux 6.x installation EPEL6 Yum Source:
32-bit System selection:
# RPM-IVH http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
64-bit System selection:
# RPM-IVH http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Import Key:
# RPM--IMPORT/ETC/PKI/RPM-GPG/RPM-GPG-KEY-EPEL-6
The default is to create Epel.repo and Epel-testing.repo two profiles under/etc/yum.repos.d/.
(2) installation of Rlwrap and ReadLine:
# yum Install rlwrap ReadLine readline-devel
Other Linux distributions if the source does not have rlwrap and readline (such as the SUSE Enterprise version default does not have these two packages), to download the two source packages separately compiled installation.
# wget ftp://ftp.gnu.org/gnu/readline/readline-6.2.tar.gz
# tar zxvf readline-6.2.tar.gz
# CD READLINE-6.2/
#/configure # make
install
# wget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.37.tar.gz
# tar zxvf rlwrap-0.37.tar.gz
# cd rlwrap-0.37/#
./configure
# make
# make install
(3) Set the Sqlplus system alias:
# Vim/home/oracle/.bash_profile
To add to the head or tail:
Alias sqlplus= ' Rlwrap sqlplus '
alias rman= ' Rlwrap Rman '
Exit the Oracle user and then log back on OK. Now it's sqlplus to use it!