what is the command to see the previously executed command that was run on the command line
?
Unix command to see the last run command on command line
kshunix
kshunix
what is the command to see the previously executed command that was run on the command line
?
Best Answer
use the
history
command.history -1
will display only the last command. Otherwise,history
will list the last 16 commands (for plainksh
, but this may differ with other korn-compatible shells).You can also use the
fc
builtin command if you are using plainksh
(command options are described in the man page).