N
N
nathan1117772021-10-26 16:44:00
linux
nathan111777, 2021-10-26 16:44:00

How to see the last entered commands in the terminal with the date and time they were entered?

There is such a command as historythanks to which you can see the last commands I entered, but it does not show the day and time when the command was entered.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2021-10-26
@nathan111777

it does not show the day and time when the command was entered

man bash -> look for HISTTIMEFORMAT -> … -> PROFIT
For example, you can add it to ~/.bashrc But, of course, this will not add the date / time to already logged commands. export HISTTIMEFORMAT='%F %T '

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question