How to run the most recent command on AIX?
23,534
Solution 1
what shell are you using?
if korn?
'r' will run the previous
bash?
ctrl-p or up-arrow or '!!'
to edit the command try using fc - it will used the $EDITOR env variable and open up the editor. For example if it's vi then it'll open vi with the command and when you save exit (ZZ or wq) it'll run it.
Solution 2
With bash, you can try
!!
to replay the last command you used. Don't know if it works with Korn.
Related videos on Youtube
Author by
jrara
Updated on September 18, 2022Comments
-
jrara over 1 year
How can I run the most recent command again from history in AIX Server? And how to edit the most recent command and run it again in AIX?
-
jrara over 11 yearsI'm using the Korn shell
-
jrara over 11 yearsHow to edit the last statement before running it?
-
mattcaffeine over 11 yearsset -o vi for example will give you inline interaction with the command line using vi command mode. That said, ESC invokes the mode and you can use the standard hjkl movement keys as well as many of the other vi motion keys to move around and modify your command.