Looking For Anything Specific?

how to view command history and extract it in cmd

This time I will give a tutorial on how to see the history of commands that we typed or have executed into CMD (command prompt) and move or extract all these commands into a doc or txt file so you can see them through word processing software such as notepad.

 

  • Opening

For those of you who are used to using computers with windows operating systems, of course you have heard of CMD or maybe use it, starting from the easiest use such as pinging to find out the connection to get an IP and MAC address to installing a program that I usually do if I want to install an existing python software package. at pypi.org.

 

The use of cmd really has no limit because this is the default software from windows that can access all the features in windows if we know how to use it, that's in my opinion.

 

But there is a downside to using cmd, that is, we have to memorize all the commands we want to use or at least we know and note because if we finish using cmd and turn it off, all commands before we use it will be automatically deleted or lost, so it's quite inconvenient if we don't memorize the command we want to use.

 

 

  • Start

That's why I made this tutorial this time, for us cmd users to be able to back up the previous command, which is used to do what we want until it's finished by converting it to writing .


Alright let's start from opening CMD, you can open it by typing cmd in windows run(box1) or typing it in start menu(box2) then enter as shown above

 

After CMD is open then you type the command you want here I will use the basic commands as an example, For the basic commands you can choose one or all of the lists below

 

  • Cd = command to move path

  • Ping 8.8.8.8 -t = test connection using google server
  • ipconfig = get ip address
  • Getmac = get mac address
  • Shutdown = some list of commands to shut down windows like /s to shutdown or /r to restart etc.

 good if you have typed the command above and want to see a list of commands used before backing it up or exporting it to writing, by using the shortcut F4 or FN + F4 until the display changes as shown below


You can reuse the commands in the list by selecting them and then clicking enter, while to convert them to writing in the .txt file we will use the command doskey /history >(box1) as shown below


Then add the path where the file will be exported(box2) plus the name and extension of the file(box3) such as .txt or .docx

 

 

After you enter the file, all the commands we use as long as cmd is not turned off will be in the file, including the last command used to create the file, as shown in the example below.


That's the tutorial on how to view command history and extract it in cmd, if you have any questions please comment below, hopefully it's useful, see you in the next tutorial

Posting Komentar

0 Komentar