cmd history code example
Example 1: history cmder
Press "Ctrl" + "r" and then type your substring to search in your history.
Last matching command line will be found, keep using "Ctrl" + "r" to find
previous ones. Once you find your searched command just press "Enter":
(reverse-i-search)`searched_substring': command_with_searched_substring
Example 2: grep history in windows
Use doskey in Windows for requesting your command history. For that you first
have to create once a storage file in some directory as follows:
doskey /history > C:/history.txt
Then just use doskey command together with fidstr to filter your history:
doskey /history | findstr "substring"
Example 3: windows history command
Use doskey! First you have to first create a storage file in a directory as:
doskey /h > c:\cmd_history.txt
Then just call your command history:
doskey /history
Optionally you can filter your history commands searching with findstr:
doskey /history | findstr "substring"