Timestamping your Bash History

Great post titled Remember when you issued that command…? by Mitch @ UConn on how to include the date/time of each command in your Bash history.

My preference is for ISO8601 time formatting, so I am using:

$> echo 'export HISTTIMEFORMAT="%F %T "' >> ~/.bash_profile

But of course, any ‘date’ formatting will work ( see “man date” for more information ).

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s