historydisplay KornShell command history |
KornShell Built-in |
history [-nr] [first [last]]
history displays KornShell commands that you executed
previously. These commands make up your command history.
By default, history displays a numbered list of the 16 most
recent commands, from earliest to most recent. By specifying values for
first and last, you can display a specified range of commands
rather than the 16 most recent. For example,
displays commands 1 through 10. The KornShell stores your command history in the file given by the variablehistory 1 10
HISTFILE. By default, this is .sh_history
on POSIX and UNIX systems. The variable HISTSIZE
gives the number of commands kept in the file; if
HISTSIZE is not defined, the default is 128.
-ndisplays the commands but not the command numbers.
-rdisplays commands in reverse order, from most recent to earliest.
history is an alias defined with
For further information, seealias history='fc -l'
fc.
HISTFILEcontains the path name of the history file.
HISTSIZEgives the maximum number of previous commands that are accessible.
0Successful completion.
1Failure due to any of the following:
2An invalid command line option or argument.