[PLUG] bash history tip of the day

Charles Sliger chaz at bctonline.com
Fri Apr 8 00:35:04 UTC 2005


Didn't work for me.  Distro = ubuntu
manpage doesn't list the HISTTIMEFORMAT either.
-chaz
Charles L. Sliger,    Information Systems Engineer,    chaz at bctonline.com
"no matter where you go, there you are..."

-----Original Message-----
From: plug-bounces at lists.pdxlinux.org
[mailto:plug-bounces at lists.pdxlinux.org] On Behalf Of Keith Nasman
Sent: Thursday, April 07, 2005 3:55 PM
To: plug at lists.pdxlinux.org
Subject: [PLUG] bash history tip of the day

Ever look at the output of your history command and wonder when you
executed that command? If one sets the HISTTIMEFORMAT bash variable then
the history entries will have a timestamp.

The format variables can be found in the date command.

Ex:
keith at r31$ export HISTTIMEFORMAT=%d%h%y\ %H:%M

produces output like:
528  07Apr05 15:44 ls /var/www
529  07Apr05 15:45 less .bash_profile
530  07Apr05 15:53 history | tail

once you've got the HISTTIMEFORMAT you'd like, make the setting occur at
each login by putting it in ~/.bash_profile for login shells or
~/.bashrc for non-login shells.
_______________________________________________
PLUG mailing list
PLUG at lists.pdxlinux.org
http://lists.pdxlinux.org/mailman/listinfo/plug




More information about the PLUG mailing list