Skip to Content

Windows command: list history

Display a full command prompt history for Windows XP:
doskey /history

and a list of most popular command (with a little help from Perl):
C:\>doskey /history | perl -ne "END { map {print ++$i.qq|: $_\n|;} splice(@{[sort {$h{$b}<=>$h{$a}} (keys %h)]},0,5); } m/(.*)/; $h{$1}++;"

Inspired by:
One liner history command counter
and
Display a full command prompt history for Windows XP