Name
history
Synopsis
history [count] history [options]
Print commands in the history list or manage the history file. With no options or arguments, display the history list with command numbers. With a count argument, print only that many of the most recent commands.
Options
-aAppend new history lines (those executed since the beginning of the session) to the history file.
-cClear the history list (remove all entries).
-dpositionDelete the history item at position position.
-nRead unread history lines from the history file into the history list.
-pargument …Perform csh-style history expansion on each argument, printing the results to standard output. The results are not saved in the history list.
-rRead the history file and replace the history list with its contents.
-sargument …Store the arguments in the history list, as a single entry.
-wWrite the current history list to the history file, overwriting it entirely.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access