FG

Retrieve Linux command line history by date

Fresh3 days ago
Mar 15, 2026113349 views
Confidence Score0%
0%

Problem

I want to see what I typed on my bash command line on a certain day a week ago. Is there a way to retrieve command line history? Something like below, perhaps?

Error Output

> history --include-date | grep 2012-02-27`

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Retrieve Linux command line history by date

Low Risk

By default, logs the time when you ran a command, but doesn't display it. The reason for this is when you run the command, it looks for an environment variable called , which tells it how to format time. If the value is or not set, then by default i…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment