Interview Preparation mode beta
Funny Facebook Status Funny Facebook Status
Enter your email address

What is the use of Unix command : history

Nice?Vote!

1 Answer

Nice?Vote!
The C shell keeps an ordered list of all the commands that you have entered. Each command is given a number according to the order it was entered.

% history (show command history list)

If you are using the C shell, you can use the exclamation character (!) to recall commands easily.

% !! (recall last command)

% !-3 (recall third most recent command)

% !5 (recall 5th command in list)

% !grep (recall last command starting with grep)

You can increase the size of the history buffer by typing

% set history=100
answered 1 year ago by siva (10,720 points)

Related questions