Three Windows command prompt shortcuts for controlling execution of scripts and console applications

Posted: (EET/GMT+2)

 

Running console applications and commands in the Windows command prompt is basic work in both IT management and software development. Today, I wanted to remind you of three useful keyboard shortcuts that you can use to control the execution of your commands.

For instance, say you wanted to run the "dir /s" command. Running this command might take a while, and thus, you might wish to cancel the execution. For this, there are two keyboard shortcuts: Ctrl+C and oftentimes, Ctrl+Break. The Ctrl+C command is the main way of cancelling commands and scripts, and some commands, such as "ping" will interpret Ctrl+Break themselves, and will not cancel the command execution. For instance in the case of ping, it will display statistics when Ctrl+Break is pressed.

Another useful command is to temporary pause the executing of a command or script. For this, you have the keyboard shortcut Ctrl+S, which stands for suspend. In addition, you have the keyboard key Pause for this, but since many administrators and developers are using laptops these days, the Pause key can be difficult to find from the keyboard (often requiring the Fn key to be used). Thus, Ctrl+S might be easier to type in.

Hope this helps!