?
Solved

Recalling previous commands in Solaris by pressing Up arrow key

Posted on 2011-05-07
8
Medium Priority
?
1,175 Views
Last Modified: 2012-05-11

I remember on Digital Unix & OpenVMS, I can always recall previous command
by pressing the Up arrow key.

How can I achieve this on Solaris 10 (ssh login using putty)?
0
Comment
Question by:sunhux
8 Comments
 

Author Comment

by:sunhux
ID: 35712627

In Korn or Bourne shell, we can issue "r a_substring_of_previous_command"
& It would retrieve back that past command while for C-Shell it's
"! a_substring_of_previous_command".

But this is not what I wanted.  I wanted that by pressing Up arrow key once,
it would recall the last command & by pressing Up arrow key twice, it would
recall the last last command & so on .....
0
 
LVL 3

Accepted Solution

by:
Abhishek_Chib earned 360 total points
ID: 35712823
0
 
LVL 81

Expert Comment

by:arnold
ID: 35712846
When you hit the arrows, do you get the control keys?
Check which terminal type you have set? echo $TERM?
vt100, ansi, xterm, etc. .
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 62

Assisted Solution

by:gheist
gheist earned 280 total points
ID: 35713272
if you are using ksh

set -o vi

esc k up esc j down etc vi-like syntax.
0
 
LVL 9

Assisted Solution

by:Amol
Amol earned 280 total points
ID: 35713926
use "bash"on your command prompt.
0
 

Author Comment

by:sunhux
ID: 35715246


Arnold, I'm on xterm.


To use bash, is it better to change the Shell in
/etc/passwd  or  insert a line "/bin/bash"  into
$HOME/.profile of that user?  Which method would
enable recall of previous commands using Up arrow
key?
0
 
LVL 81

Assisted Solution

by:arnold
arnold earned 80 total points
ID: 35715373
the shell provides the feature, change in passwd will mean there will be one fewer processes on the system. (sh, /bin/bash)
0
 

Author Closing Comment

by:sunhux
ID: 35715945
ok
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
We all know how boring and exhausting it is to transfer huge web projects developed locally to a webserver simply via FTP. The File Transfer Protocol is a really nice solution if you need to transfer small amounts of files, but if you're plannin…
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses
Course of the Month12 days, 22 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question