We write a lot of commands everyday on terminal. And a lot of commands we forget when we ran them. So those who are doing the cron jobs and the scheduling type of scripts. You can see that knowing which commands we entered before is always a god thing to learn as well.
History is one such command that allows you to look into the past commands. And it can keep a lot of commands in memory and it would return you those commands once you push for the command.
So if you want to know the commands that you had in input, just type in history.
history
This should output the following output to you on the screen.
As you can see from the screenshot I had a lot of commands added to the terminal and it returned a lot of commands from all the previous sessions too. So my next attempt would be to find out how to clear the session of all those stored history of commands.
Have you used the history commands? What is your experience with this command? Have you used the history command with the terminal?
0 comments:
Post a Comment