您的位置:首页 > 其它

U盘自动挂载与卸载

2011-08-23 11:16 113 查看
方法一:要使用退格键的时候,同时按住ctrl+backspace

方法二:在任意一个启动脚本中添加如下内容
[oracle@night ~]$ tail -1 .bash_profile
stty    erase   ^H
stty的意思是set tty,主要是用来检查和修改当前注册的终端的通信参数如上两种方法只是单一的解决了退格键的问题,如果我想回调sqlplus中执行过的命令 还是不行

方法三:可以使用退格键,可以回调sqlplus中执行过的命令
使用第三方工具rlwraphttp://utopia.knoware.nl/~hlub/uck/rlwrap/解压安装完毕之后
[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
总计 168
-rwxr-xr-x 1 oracle oinstall 165717 07-25 23:33 rlwrap
[oracle@night bin]$
添加到PATH中

[oracle@night ~]$ vim .bash_profile


export PATH=$PATH:$ORACLE_BASE:$ORACLE_HOME/bin:/u01/rlwrap/bin


立即生效
[oracle@night ~]$ source .bash_profile
[oracle@night ~]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/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


使用
[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, 2009, Oracle.  All rights reserved.
SQL> conn sys/ as sysdba
Enter password:
Connected.
SQL>


也可以使用命令别名
[oracle@night ~]$ alias sqlplus='rlwrap sqlplus'
[oracle@night ~]$ alias
alias l.='ls -d .* --color=tty'
alias ll='ls -l --color=tty'
alias ls='ls --color=tty'
alias sqlplus='rlwrap 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, 2009, 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


如果想下次生效,可添加到启动脚本内

随笔记录
本文出自 “night ★linux运维” 博客,请务必保留此出处http://night820.blog.51cto.com/7492507/1257680
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: