0

How can I easily see a list of commands I recently entered in the shell? Instead of going up

1

2 Answers 2

4

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.

1
  • Awesome that's what I was looking for
    – bigTree
    Feb 28, 2014 at 10:04
2

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)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .