Monday, May 18, 2009

Using history effectively

Read an interesing article on Jun 2009 LINUX Format. Thought I write it down

  1. Solution 1:
    If you are using BASH, and you will get to see a list of commands that have been typed.
    # history
  2. Solution 2:
    Press Ctrl+R and a "reverse-i-search" prompt is provided. Just type what you need to search
  3. Solution 3:
    .bash_history can also show the list of commands used. Just
    #less .bash_history
  4. Solution 4: To record the command you use, you can use script
    Before you start logging, just type script and the entire content of the session will be saved in a file called typescript. To end the session, just press CRTL+D.

My favourite. just the good old history

No comments: