[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

AIX via Putty command control

Posted on 2011-09-28
5
Medium Priority
?
1,469 Views
Last Modified: 2012-05-12
I'm using AIX via Putty.
How can I navigate through latest executed commands like what we can dp in other tools like DOS and CYGWIN (using up and down arrows)
I know that pressing ESC and K will show the latest command on screen ;but even that command can not be edited.

please advise
0
Comment
Question by:it-rex
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 35

Assisted Solution

by:johnsone
johnsone earned 600 total points
ID: 36718751
Sounds like you have vi style command line editing in place.

Try using this command:

set -o emacs

This will give you emacs style command line editing and should work more like you are used to with the arrow keys and also being able to edit the command.
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 1000 total points
ID: 36718777
Hi,

seems that you're using "set -o vi" as the commandline editing option.
So the regular vi keys will work to edit the command, but I think that's not what you desire.

I assume that you're using ksh (since it's AIX), so you can do this:

Set these aliases in /etc/profile or your personal $HOME/.profile:

alias __A=$(echo "\020")   # up arrow = ^p
alias __B=$(echo "\016")   # down arrow = ^n
alias __C=$(echo "\006")   # right arrow = ^f
alias __D=$(echo "\002")   # left arrow = ^b

and add

set -o emacs

to the respective file.

Now log out and log in again. The arrow keys will work, and <ESC><ESC> will do filename completion.

wmp
0
 
LVL 6

Assisted Solution

by:Tomunique
Tomunique earned 400 total points
ID: 36814782
Why is everyone pushing him to emacs....??

it-rex...  what do you mean "that command can not be edited"?

Try this;
Does your backspace key give you ^? characters...
If so, putty is mis-configured for AIX.
In putty window, on the title-bar, select the icon to the far left, go to "change settings"
this brings up the config window.. (on the left under terminal->keyboard)  ensure backspace is set to control-H

You could also change it from AIX by using the "stty erase" command   passing it a "space backspace" parm
ie:   stty erase  ^?    (is what it may appear ^? representing your backspace key)


IF this isn't your problem, maybe  it's your understanding of the vi command line editor.
when you press esc-k/j scroll up/down tthrough your command history  
you can press escape again to enter "edit mode".

These are your standard "vi" ascii terminal keys.
h = left
l=right
x=delete
cw=change word
etc
You can even search your command history by using /

Can you please explain what problem you're seeing, if the above doesn't help.

0
 
LVL 35

Expert Comment

by:johnsone
ID: 36815455
Pushing to emacs as it would be closer to the DOS style command line editing that it seemed they are looking for.

Personally, I prefer the emacs style over the vi style.  However, I know both vi and emacs pretty well and can use either.
0
 
LVL 11

Author Closing Comment

by:it-rex
ID: 36903585
thanks
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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

656 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