Sunday, 14 December 2008

why we need bash_history?

Use of bash_history:

Each command executed in the shell is recorded by giving numbers sequentially
to each command. (you can use history to see all recently executed commands)

- with this you can execute a particular command with ! from the shell prompt.
- Inorder to see the command against the number, you can use !:p to just print the command w/o executing it.

E.g: $ !54
o/p : vi ( opens the file)

E.g: $ !54:p
o/p : vi (just prints the command)

No comments:

Post a Comment

Tweets by @sriramperumalla