Reputation: 1202
Is there a command or a technique to figure out exactly what time I ran the last command in bash?
Upvotes: 1
Views: 375
Reputation: 1428
you can use the bash history:
export HISTTIMEFORMAT="%F %T "
this will log the commands you enter on the terminal (not the ones that are run inside a script).
view the result with the command history
or inspect ~/.bash_history
.
To make this permanent, add the above line to ~/.bashrc
.
Upvotes: 3