hpux command
history [-n | a z] display the command history.
example:
hpux#[/home/maintenance/total/201106]history -3 list the last three commands
187 ./total.pl
188 env
189 env |grep EDITOR
hpux#[/home/maintenance/total/201106]history 100 102 list command unmber 100 through 102
100 exit
101 ls
102 cd /home/itow
you type r c to re-enter command unmber c
r 101
-----------------------------------------
recalling commands
must have the editor environment variable set
export EDITOR=vi
at $, press esc and use normal vi commands to scroll through previous cmmands.
k scrolls backward through the command history.
j scrolls forward through the command history.
nG takes you to command number n.
press return to execute the command.
-----------------------------------------
阅读(2148) | 评论(0) | 转发(0) |