How can I view history in terminal for specific date?

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"

More info:

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like