Date: Thu, 2 Nov 2017 15:13:50 -0400 From: "James B. Byrne" <byrnejb@harte-lyne.ca> To: freebsd-questions@freebsd.org Subject: Reconstruct a bash_history file Message-ID: <cc029c227a6b8de747426ba4cf9a7066.squirrel@webmail.harte-lyne.ca>
next in thread | raw e-mail | index | archive | help
I wish to reconstruct a bash_history file for a user who has HISTTIMEFORMAT=%F %T:. I have a history log file having the following format: . . . 2014-06-19 16:09:25: whois playford.de 2014-06-20 08:24:00: man xpdf 2014-06-23 08:22:16: su -l 2014-06-24 09:33:27: cd Desktop 2014-06-25 09:22:25: su -l 2014-06-26 12:15:28: su -l 2014-06-27 08:48:40: su -l 2014-06-30 08:18:04: 2014-07-02 15:40:57: history | grep enscript 2014-07-03 08:38:55: ll 2014-07-04 09:29:04: su -l 2014-07-07 09:33:34: ssh -Y xnet241 2014-07-08 08:29:59: su -l 2014-07-09 06:53:46: su -l 2014-07-10 11:20:20: whois arcom.com.br 2014-07-11 10:02:24: su -l 2014-07-14 09:58:27: su -l 2014-07-15 08:46:38: su -l 2014-07-16 10:31:52: sshtn xnet241 2014-07-17 09:50:23: history | grep PORT . . . Is there a way to recreate a valid bash_history file from this data and preserve the time stamps? If so then how? -- *** e-Mail is NOT a SECURE channel *** Do NOT transmit sensitive data via e-Mail Do NOT open attachments nor follow links sent by e-Mail James B. Byrne mailto:ByrneJB@Harte-Lyne.ca Harte & Lyne Limited http://www.harte-lyne.ca 9 Brockley Drive vox: +1 905 561 1241 Hamilton, Ontario fax: +1 905 561 0757 Canada L8E 3C3
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cc029c227a6b8de747426ba4cf9a7066.squirrel>