Friday, August 15, 2014

How to run previous command by history index in Windows command prompt

I want to know to how run a previous command in history by index like how it is done in Linux (i.e ![index]).


Yes, F9 in cmd raises a pop up box that allows me to enter in the index, but how do I do it straight form the command-line without the dialog box? Is there a way to do this in cmd without third party downloads?


Additionally, is there a way to display the command history with indexes all well? Moreover, doskey /history displays a list of the previously executed commands however it does not list the indexes too.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...