Skip to Content

Reply to comment

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

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options