Command history in AIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Command history in AIX
# 1  
Old 09-18-2006
Command history in AIX

Hi All,

I would like to know how to get the command history from the prompt. For example in dos, if we hit the Up Arrow, we get the previous command. I am not getting this in my telnet session (AIX) at the prompt.

I know that if I type history command it will give a list of cammands I typed earlier. But what i need is the short cut key were like the up arrow in dos were in i will get the previous command at the prompt.

Thanks in advance...

Priya
# 2  
Old 09-18-2006
Assuming your shell is ksh and you're used to vi:

Code:
$ set -o vi
$ <esc>k

Basically the set command sets your keyboard to use the same basic key commands you can use in vi to get arround. The esc key puts you into command mode just like in vi. From there you can use 'k' to move up in the history, 'j' to move down, 'l' to move left and 'h' to move right. You can also hit '/search term' to search for a command. Those are the ones I use most of the time.

You can also set -o emacs if you know the keystrokes for emacs.

Carl
# 3  
Old 09-18-2006
It worked....

Thank you very much Carl.....

Priya
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Checking the command history file in AIX

Hello, The system has been rebooted and I need to see the commands executed in the system prior to restart by the oracle user.The history command is not showing me the commands executed prior to reboot. Please advise. Best regards, Vishal (1 Reply)
Discussion started by: Vishal_dba
1 Replies

2. UNIX for Dummies Questions & Answers

Command history

hi i want to show my history command in UNIX solaris ( bash shell ),, i tried this command ( HISTTIMEFORMAT="%d/%m/%y %T " ) but it's not working with me ,, is there any restricted condition to do this command any one know why it's not working to me .. thanks (10 Replies)
Discussion started by: mondo32
10 Replies

3. AIX

How to enable command history in AIX 6

Hi Friends, I am using AIX 6 with ksh shell, i am not able to get the commands histroy which was used earlier by pressing up and down arrow keys. Could you please help me to enable the history for ksh shell in AIX 6 OS. Thanks in Advance. Siva Kumar. (3 Replies)
Discussion started by: sivakumarl
3 Replies

4. UNIX for Dummies Questions & Answers

The history command: See other users command history

Can anyone tell this: If two users are logged into the same server from different locations. Is there a way to see the history command of the other user? I tried the history command, but it is showing me only the commands I used. Thanks in advance for your help. Iamnew2solaris (1 Reply)
Discussion started by: iamnew2solaris
1 Replies

5. UNIX for Advanced & Expert Users

history command

Hi, I want the command which has to tell all the commands used in different terminals of same Unix box. Command "history" will give the commands used in the same terminal. Advance thanks for your response. (1 Reply)
Discussion started by: senkerth
1 Replies

6. UNIX for Dummies Questions & Answers

command history

Hi all, How can i view command history of a day. when i used history command in my AIX server, it shows only last 16 commands. Is there a location where all the history is stored ? Thanks in advance! (2 Replies)
Discussion started by: lramsb4u
2 Replies

7. UNIX for Dummies Questions & Answers

vi command history

How do you look at the whole list of previous commands you have used in VI? I know you can use the up and down arrows, but I know there's a way to see the full list. (5 Replies)
Discussion started by: cokedude
5 Replies

8. UNIX for Dummies Questions & Answers

AIX bash history recall

Is it possible to use the keyboard UP ARROW in place of k to recall history? If so, how/what do I need to do change terminal emulation, etc.? TIA, George (7 Replies)
Discussion started by: gwfay
7 Replies

9. Shell Programming and Scripting

History Command

Hi all experts, I want to see all the command that is typed in the server 3 days ago. I typed HISTORY command but it does not show all the things. The reason is my senior DBA could see all the commands ran in the server 3 days ago but i cannot see. Please let me know is there anyway i can view... (6 Replies)
Discussion started by: ma466
6 Replies

10. AIX

turn on aix history command

how do i turn on aix43 history command? so that i could recall the command with <esc>+k. thanks (3 Replies)
Discussion started by: itik
3 Replies
Login or Register to Ask a Question