Open vim editor and press
then (colon Key) :
Use up and down arrows to see the previous command history.
Open vi editor and press
This will list around 20+ commands in the screen.
Open the .viminfo file in the home directory which will give you the list of commands which got executed preiously.
# Value of 'encoding' when this file was written
# hlsearch on (H) or off (h):
# Last Search Pattern:
# Command Line History (newest to oldest):