Linux 连接oracle 时,无法使用回退键问题
使用xshell 连接远程linux 数据库服务器,当切换到sqlplus 控制台时,
输入错误字符的时候,使用回退键时,显示^H。
解决方法:
$ stty erase ^H : 与退格键相关的设置是erase,它表示删除最后一个字符。
如果在当前窗口执行的话,只对当前的窗口有效,下次登陆的时候还需要重新设置,
可以把这个命令写入shell 的配置文件,
如~/.bashrc 中,这样每次都能生效了。
[root@orcl11 ~]# vi ~/.bashrc
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
stty erase ^H -------添加该条目
[root@orcl11 ~]# source ~/.bashrc -----配置生效