: 1044232977:0;ls -l
: 1044232943:0;cat hoge
: 1044232709:0;mv *jpg image/
#!/usr/bin/env perl
use POSIX;
while (<>) {
my ($t, $c) = /(\d+).+;(.+)/;
print strftime("[%Y-%m-%d %H:%M:%S] ", localtime($t)),
substr($c, 0, 57), "\n";
}
% tac ~/.zsh-history | zsh-history-viewer | less出力例:
[2003-02-03 09:42:57] ls -l
[2003-02-03 09:42:23] cat hoge
[2003-02-03 09:38:29] mv *jpg image/
% history -nir 0 | lesshistory のオプション一覧は、"history -" と入力してこの場でタブを打
% history -nir 0 | cut -c-78 | less