Obscure Windows CMD commands.

Posted: December 6, 2017. At: 12:28 PM. This was 3 months ago. Post ID: 11574
Page permalink.
WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters. These cookies expire two weeks after they are set.

There are quite a few Windows CMD commands that users do not know about. I will be showing you a handful to improve your usage of the CMD prompt.

The findstr command. This is just like the grep command for Linux.

findstr /s "BIS_C_OFFROAD" *.sqm

This is example usage of this command. Searching a text file for a certain string.

>findstr /s "HKEY" tools.txt
tools.txt: HKEY_CLASSES_ROOT\.pbo\DefaultIcon
tools.txt: HKEY_CLASSES_ROOT\.pbo\shell\Extract all
tools.txt: HKEY_CLASSES_ROOT\.pbo\shell\Extract PBO...
tools.txt: HKEY_CLASSES_ROOT\Folder\shell\create PBO\

And this is how to search multiple text files in a directory for a certain string.

>findstr /s /M "HKEY" *.txt

The systeminfo command outputs all of the pertinent information about your computer system to the CMD prompt. Use it like this to put the information in the clipboard instead.

systeminfo | clip

List all hard drives on your Windows machine.

>fsutil fsinfo drives
Drives: C:\ D:\ E:\ F:\ H:\ I:\

Display the location of an executable on your Windows box.

>where notepad.exe

This command executed in the CMD prompt will open Windows Explorer for the current directory.

start .

How to get the last boot up time of your machine.

C:\Users\Corporal Kerry\Documents>wmic os get lastbootuptime

No comments have been made. Use this form to start the conversation :)

Leave a Reply