Home > Database > Mysql Tutorial > body text

Linux系统下SQL*Plus方向键没法使用的解决

WBOY
Release: 2016-06-07 16:51:07
Original
1274 people have browsed it

在Linux操作系统下使用Oracle的SQL*Plus工具有一个比较麻烦的地方:通过sqlplus命令进入到SQL*Plus控制台后,我们在Bash中已经习

在Linux操作系统下使用Oracle的SQL*Plus工具有一个比较麻烦的地方:通过sqlplus命令进入到SQL*Plus控制台后,我们在Bash中已经习以为常的上下左右键突然变成了^[[A^[[B^[[D^[[C这样的"乱码"。熟悉ksh的朋友肯定要说我们这是大惊小怪了,不过对于从Windows平台转过来的一般用户而言,不小心按错一下就是4个错误的字符,而且历史命令也无法方便的回查了,确实挺郁闷的。

别着急,,如果你的Linux是Debian或者Ubuntu/Kubuntu,直接sudo apt-get install rlwrap安装这个小巧的readline扩展,然后就可以以rlwrap sqlplus的方式进入方向键"正常"的SQL*Plus了。当然,如果嫌每次敲rlwrap不爽,可以在/etc/profile或者自己的~/.bashrc里面添加alias sqlplus='rlwrap sqlplus'。其他发行版的朋友可以选择rpm包或者干脆从源码自己编译。

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!