Comments on: How to Enable Timestamp in Linux History Command Output https://www.linuxtechi.com/enable-timestamp-history-command/ Sun, 16 Jul 2023 07:09:00 +0000 hourly 1 By: Rohan https://www.linuxtechi.com/enable-timestamp-history-command/#comment-22618 Mon, 28 Dec 2020 12:15:11 +0000 https://www.linuxtechi.com/?p=9136#comment-22618 I see my code is always giving current time when I execute with HISTTIMEFORMAT. Could you please assist
#!/bin/bash
HISTFILE=~/.bash_history
set -o history
HISTTIMEFORMAT=”%d/%m/%y %T” history | grep -v grep | | grep “\/test\.sh -f \input.xml”| tail -n1

]]>
By: Gyanendra https://www.linuxtechi.com/enable-timestamp-history-command/#comment-21263 Thu, 06 Aug 2020 08:05:13 +0000 https://www.linuxtechi.com/?p=9136#comment-21263 You will have to wait guys. It will show same time old history command because for those time was not taken. You give some command after interval of few mins/seconds, you will see correct time.

]]>
By: Alan https://www.linuxtechi.com/enable-timestamp-history-command/#comment-20381 Mon, 25 May 2020 01:33:55 +0000 https://www.linuxtechi.com/?p=9136#comment-20381 yes, the timestamps on this are just ‘when they’re output to the command prompt. it’s not valid timestamp data

]]>
By: Scott https://www.linuxtechi.com/enable-timestamp-history-command/#comment-19477 Tue, 31 Mar 2020 13:13:42 +0000 https://www.linuxtechi.com/?p=9136#comment-19477 This does not work exactly … all my time stamps are incorrect

]]>
By: Oleg https://www.linuxtechi.com/enable-timestamp-history-command/#comment-16767 Wed, 06 Nov 2019 18:10:25 +0000 https://www.linuxtechi.com/?p=9136#comment-16767 Thank you ! Very helpful.

]]>