Name
history
Synopsis
history [options]
Display the list of history events. (History syntax is discussed earlier in “Command History.”)
Options
-
-c tcsh only. Clear history list.
-
-h Print history list without event numbers.
-
-r Print in reverse order; show oldest commands last.
- n
Display only the last n history commands, instead of the number set by the
historyshell variable.-
-Lfile tcsh only. Load series of pushd and popd commands from
filein order to re-create a saved stack.-
-Mfile tcsh only. Merge the current directory stack and the stack saved in
file. Save both, sorted by time, infile, as a series of pushd and popd commands.-
-Sfile tcsh only. Print to
filea series of pushd and popd commands that can be invoked to replicate the stack.
Example
To save and execute the last five commands:
history -h 5 > do_it
source do_it