How to enable command history in AIX 6


 
Thread Tools Search this Thread
Operating Systems AIX How to enable command history in AIX 6
# 1  
Old 05-21-2012
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.
# 2  
Old 05-21-2012
Siva Kumar,
AIX by default use ksh shell and to get your history straight away from the command line you have to get into esc mode ( similar to VI).

ESC + k ( previous command) , keep on pressing k to see what all command you have executed

Similarly , if you want to retrive any previous command with its keywords then use ESC+/ , then enter the keyword for ex lsvg , then it will list all the previous commands related to lsvg, then you use 'k' to surf through all the commands.

So its basically , using vi shell commands on the command line, if you know vi well then its very easy Smilie.

HTH
niv
# 3  
Old 05-22-2012
If it still is not working for you, you may have to put a "set -o..." command in your $HOME/.profile or $HOME/.kshrc.

See this link:

Enable vi ksh Command Line Editing | a Tech-Recipes Tutorial

If you would rather use "emacs" commands for processing your history:

Viewing Session History in the ksh Shell | What the Shell? Getting Started with Unix | Peachpit


-tony
# 4  
Old 05-22-2012
Code:
set -o vi

to kick off vi as the history editor if it is not in your .profile - and how would you edit .profile is another thread if you do not know vi and don't have another editor...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Privacy enable on SNMPv3 AIX)

I have SNMPv3 working on our server but when viewed from the security software, it shows no privacy enabled AIX 7.1, TL1, snmp.crypto 6.1.2.0 installed, ran snmpv3_ssw -e Unsure what I have configured wrong. What is needed to show Privacy in AIX. I looked at a config on a Solaris box... (5 Replies)
Discussion started by: anrivera140
5 Replies

2. 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

3. AIX

Is it must to enable TCB on AIX LPARs ?

Hi, I've verified my AIX 7.1 LPAR , and TCB is disabled by default. #odmget -q attribute=TCB_STATE PdAt PdAt: uniquetype = "" attribute = "TCB_STATE" deflt = "tcb_disabled" values = "" width = "" type = "" generic = "" ... (3 Replies)
Discussion started by: System Admin 77
3 Replies

4. AIX

Enable large filesize option in NFS mount in AIX 4.3

Hi All, I have a NFS mount filesystem, however it is not supporting a creation of filesize greater than 2 GB in it, how can i enable the option (bf = true) in it. The AIX version is 4.3.2 Thanks in Advance!! (1 Reply)
Discussion started by: mad_man12
1 Replies

5. 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

6. AIX

Enable send email through smtp - exchange on AIX 6.1

Please help, i can not to send email from AIX 6.1 to outside network through STMP - Exchange. Any one can help ? (1 Reply)
Discussion started by: ichsan
1 Replies

7. 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

8. 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

9. UNIX for Dummies Questions & Answers

regular user - enable printer - aix unix

how can I let a regular user enable a printer? (0 Replies)
Discussion started by: naes
0 Replies

10. Shell Programming and Scripting

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... (2 Replies)
Discussion started by: priya_v111
2 Replies
Login or Register to Ask a Question