top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How do you see command line history in UNIX?

+2 votes
348 views
How do you see command line history in UNIX?
posted Jul 27, 2015 by Mohammed Hussain

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

Very useful indeed, use history command along with grep command in UNIX to find any relevant command you have already executed.

Example

$ history

Output
911  man  7 signal
912  man ps
913  man  7 signal
914  man killall
915  killall -l
916  man killall
917  su -

$ history | grep killall

Output
914  man killall
915  killall -l
916  man killall
answer Jul 28, 2015 by Manikandan J
...