FG
💻 Software

How can I see a timestamp for when a command was executed using history?

Fresh5 days ago
Mar 15, 202611369 views
Confidence Score0%
0%

Problem

I'd like to check at what time/date a command in bash history was executed. Is this possible?

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How can I see a timestamp for when a command was executed using history?

Low Risk

It is possible. The command says: If the $HISTTIMEFORMAT variable is set and not null, its value is used as a format string for strftime(3) to print the time stamp associated with each displayed history entry. No time stamps are printed otherwise I …

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment