How can I view the terminal history for a specific date?
For example today is 4-apr and I want to view the history of 31-mar
1 Answer
You can set the history format to include the date using the following:
HISTTIMEFORMAT="%d/%m/%y %T "Then filter for a specific date using grep:
history | grep "31/03"3More info:
Note From @muru and @Kamil- HISTTIMEFORMAT should already have been set during this period, or bash will just use today's date
Bash Man - HISTTIMEFORMAT
- nixCraft - Bash History - Display Date and Time