rlwrap的使用

在LINUX下使用ORACLE一些命令时(如sqlplus,rman等),经常需要调用上次或之前运行过的命令或者输入错误时使用回退键删除,而rlwrap就提供了这一功能。
可从以下地址获取rlwrap:
http://utopia.knoware.nl/~hlub/rlwrap/ 下载rlwrap-0.37.tar.gz
或者从以下地址获取对应版本的安装包:

http://rpm.pbone.net/index.php3/stat/4/idpl/15288816/dir/redhat_el_6/com/rlwrap-0.37-1.el6.x86_64.rpm.html

http://rpm.pbone.net/index.php3/stat/4/idpl/15276193/dir/redhat_el_5/com/rlwrap-0.37-1.el5.x86_64.rpm.html

安装
#tar zxvf rlwrap-0.37.tar.gz
#cd rlwrap-0.37
# ./configure && make && make install

或者
#rpm -ivh rlwrap-0.37-1.el6.x86_64.rpm

检查是否安装成功
[root@dg ~]# rlwrap
Usage: rlwrap [options] command ...

Options:
  -a[password:]              --always-readline[=password:]
  -A                         --ansi-colour-aware
  -b                  --break-chars=
  -c                         --complete-filenames
  -C                 --command-name=
  -D  <0|1|2>                --history-no-dupes=<0|1|2>
  -f        --file=
  -g                 --forget-matching=
  -h                         --help
  -H                   --history-filename=
  -i                         --case-insensitive
  -I                         --pass-sigint-as-sigterm
  -l                   --logfile=
  -n                         --no-warnings
  -N                         --no-children
  -o                         --one-shot
  -O                 --only-cook=
  -p[colour]                 --prompt-colour[=colour]
  -P                  --pre-given=
  -q                  --quote-characters=
  -m[newline substitute]     --multi-line[=newline substitute]
  -r                         --remember
  -R                         --renice
  -v                         --version
  -s                      --histsize= (negative: readonly)
  -S                 --substitute-prompt=
  -t                   --set-term-name=
  -w                      --wait-before-prompt= (msec, <0  : patient mode)
  -z         --filter=

bug reports, suggestions, updates:
http://utopia.knoware.nl/~hlub/uck/rlwrap/



使用

--直接在命令前加上rlwrap
[oracle@dg ~]$ rlwrap sqlplus / as sysdba

或者配置环境变量,在末尾添加以下行
[oracle@dg ~]$ vi .bash_profile
stty erase ^h
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'

--使环境变量立即生效
[oracle@dg ~]$ source  .bash_profile

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/429786/viewspace-776177/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/429786/viewspace-776177/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值