Linux sql*plus history command callback problem

  
 

When using Oracle's sqlplus under Linux,

by default, the arrow keys do not play the role of moving the cursor left and right. This makes it inconvenient to execute the previously used commands. After searching online, I found that I can use rlwrap to help us achieve this. First download

su - rootwget http://utopia.knoware.nl/~hlub/rlwrap/rlwrap-0.30.tar.gz

Unzip tar -zxvf rlwrap-0.30 after downloading. Tar.gz gets the rlwrap-0.30 folder, go to

cd rlwrap-0.30./configuremakemake installsu - oracle

Enter the Oracle user home directory, find the .bash_profile file, add the following at the end < Br>

alias sqlplus="rlwrap sqlplus"alias rman="rlwrap rman"

You can also use # echo 'alias sqlplus="rlwrap sqlplus"' >> /home/oracle /.bash_profile# echo 'alias rman="rlwrap rman"' >> /home/oracle/.bash_profile

Join, then restart or execute sh /home/oracle/.bash_profile.

Copyright © Windows knowledge All Rights Reserved