How can I easily see a list of commands I recently entered in the shell? Instead of going up
2 Answers
Try the below command,
history
NAME history - GNU History Library COPYRIGHT The GNU History Library is Copyright (C) 1989-2011 by the Free Software Foundation, Inc. DESCRIPTION Many programs read input from the user a line at a time. The GNU His‐ tory library is able to keep track of those lines, associate arbitrary data with each line, and utilize information from previous lines in composing new ones.
Run man history
command for more details.
history | less
--> view/scroll up/down the command executed list
history | tail -f
--> last 10 executed commands
if you want to get the execution timestamp of commands, export following environment variable
HISTTIMEFORMAT=" %F %T "
(Helpful to trace timestamp of command, filtering)