Search Edit Commands

These commands access your command history.

[count] k Fetch previous command. Each time k is entered the previous command back in time is accessed.
[count] Equivalent to k.
[count]j Fetch next command. Each time j is entered the next command forward in time is accessed.
[count]+ Equivalent to j.
[count]G The command number count is fetched. The default is the least recent history command.
/string Search backward through history for a previous command containing string. String is terminated by a Return or Newline. If string is preceded by a ^, the matched line must begin with string. If string is null the previous string will be used.
? string Same as / except that search will be in the forward direction.
n Search for next ...

Get Korn Shell: Unix and Linux Programming Manual, Third Edition, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.