Saturday, May 19, 2012

How To: View the History of Commands Executed in Linux

You have executed a lot of commands on the command line and want to view that complicated command with a lot of options. The history command displays all the commands that you have executed in the past for the current session.

$ history


Since the list can grow beyond the screen size its better to pipe it with "less" to scroll through - history | less. The file .bash_history stores these commands


1 comment: