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
.
HTH
niv
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. UNIX for Dummies Questions & Answers
how can I let a regular user enable a printer? (0 Replies)
Discussion started by: naes
0 Replies
3. AIX
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
4. UNIX for Dummies Questions & Answers
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
5. AIX
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
6. UNIX for Dummies Questions & Answers
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
7. AIX
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
8. AIX
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
9. 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
10. 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
exec(1) User Commands exec(1)
NAME
exec, eval, source - shell built-in functions to execute other commands
SYNOPSIS
sh
exec [argument...]
eval [argument...]
csh
exec command
eval argument...
source [-h] name
ksh
*exec [arg...]
*eval [arg...]
DESCRIPTION
sh
The exec command specified by the arguments is executed in place of this shell without creating a new process. Input/output arguments may
appear and, if no other arguments are given, cause the shell input/output to be modified.
The arguments to the eval built-in are read as input to the shell and the resulting command(s) executed.
csh
exec executes command in place of the current shell, which terminates.
eval reads its arguments as input to the shell and executes the resulting command(s). This is usually used to execute commands generated as
the result of command or variable substitution.
source reads commands from name. source commands may be nested, but if they are nested too deeply the shell may run out of file descrip-
tors. An error in a sourced file at any level terminates all nested source commands.
-h Place commands from the file name on the history list without executing them.
ksh
With the exec built-in, if arg is given, the command specified by the arguments is executed in place of this shell without creating a new
process. Input/output arguments may appear and affect the current process. If no arguments are given the effect of this command is to mod-
ify file descriptors as prescribed by the input/output redirection list. In this case, any file descriptor numbers greater than 2 that are
opened with this mechanism are closed when invoking another program.
The arguments to eval are read as input to the shell and the resulting command(s) executed.
On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways:
1. Variable assignment lists preceding the command remain in effect when the command completes.
2. I/O redirections are processed after variable assignments.
3. Errors cause a script that contains them to abort.
4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari-
able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not
performed.
EXIT STATUS
For ksh:
If command is not found, the exit status is 127. If command is found, but is not an executable utility, the exit status is 126. If a redi-
rection error occurs, the shell exits with a value in the range 1-125. Otherwise, exec returns a zero exit status.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO
csh(1), ksh(1), sh(1), attributes(5)
SunOS 5.10 17 Jul 2002 exec(1)