开发者

Run the last executed command in Windows command prompt

开发者 https://www.devze.com 2023-01-06 04:43 出处:网络
When u开发者_开发问答sing UNIX I use to type !! to run the last executed command. How could I do the similar kind of operation on Windows command prompt?↑ followed by EnterYou can also use F7 to

When u开发者_开发问答sing UNIX I use to type !! to run the last executed command.

How could I do the similar kind of operation on Windows command prompt?


followed by Enter


You can also use F7 to navigate the command history. F1 will recover the last command character by character.


Windows PowerShell

  • ihy
  • Invoke-History

Sometimes (if you didn't press F9 & didn't choose an older command and if you didn't navigate through history using the keys F5 / F7), the following keys can work in cmd:

  • F3 - gets the last command
  • F5 - gets the last command when you press it for the first time, then it iterates through the commands history
  • F8 - gets the last command when you press it for the first time, then it iterates through the commands history (it can also go from the first one to the last one)

A description for the functions above can be found on the Microsoft website.


You can just use the up and down arrows or F3

0

精彩评论

暂无评论...
验证码 换一张
取 消