Well, you can query your command line history to find previous commands by using the following syntax:
- history |grep "search string"
A curious aspect is that bash remembers this query as well, so you never get a null result, even a rubbish search gives you itself:
- $ history | grep "fjkskjfvkjf"
140 history | grep "fjkskjfvkjf"