Friday, July 10, 2009

Given a command, show me the last time it was executed

There are several other ways to do this, but this one was news to me.

Let's say you want to see what was the last 'tar' command executed on your history.

On your shell, type:

!tar:p


The :p will show you the command without executing it.

Source: Linux Journal

0 comments: