Posts Tagged ‘shell’

A lesson in Ubuntu history

September 19th, 2009

If you have been using Ubuntu (or any Unix variant), you should now know that there is a history command which keeps track of the commands you have executed in the shell.  I have been using Ubuntu for a few months and my history command list is now at 500+ commands.

Here are some of the basic uses of the history command:

> history
  • this lists all commands you have executed in the shell
> history | more
  • same as above but only shows a page of list
  • press spacebar to move to the next page
  • press the letter q to quit displaying history commands
  • the | is a pipeline which means redirect the output of the history command as input to the more command
> history | grep <text>
> history | grep ls
> history | grep rsync
  • lists only the shell commands that contains the text after the grep command
  • grep basically is a command line text search utility
> man history
  • help manual of the history command
  • very helpful documentation I must say!

Read more…

Author: Cyril Pauya Categories: Software Tags: ,