Jan 14th, 2022 · Comments Off on How To Add Timestamps To The History Command Output In Linux
The history command in Linux is very useful for recalling previously typed commands.
When using it, you can also add a timestamp to the history’s list of previously used commands. This can be handy in knowing which commands were used when.
It is done by setting the HISTTIMEFORMAT Bash variable. Set it to display the date and time, and then history will show the timestamps next to the list of...
Dec 7th, 2018 · Comments Off on Type Less By Using The History Feature In Bash Shell To Recall Previous Linux Commands
Bash shell has a robust history feature which makes it easy to keep a track of previous commands that can be run again whenever needed.
So if you spend a lot of time with Linux commands, this can save time by not entering same commands over and over.
Seeing previously used commands:
To get a list of previously used commands, from the shell/Terminal type:
This will show all the commands as...