Home > Uncategorized, Windows > Windows Command line – CMD – fu : Notes

Windows Command line – CMD – fu : Notes

So i haven’t used the Windows Command (DOS) Prompt for many things until I realized that Android / Android Studio / Android SDK and the emulator (with the HAXM driver) work pretty well on Windows.

Long story short, there seems to be a lot of powerful things in this “predecessor” to Powershell.

Viewing and Saving Command History:

One of the things i wanted to do was to view my command line history. This can be easily done by pressing F7 and lo and behold a smaller dialog within the cmd window will appear with the command history.

Now, the F7 trick doesn’t really allow you to save the history, nor to copy-paste it, so i needed another solution. The command below provides this solution.

doskey /history > history.txt 

Essentially, this copies (redirects) the cmd history of only the current session into a text file named history.txt or whatever you’d like to name your text file .

Sources:

[1]. http://www.computerhope.com/tips/tip189.htm

[2]. http://serverfault.com/questions/95404/is-there-a-global-persistent-cmd-history

[3]. http://www.howtogeek.com/119386/5-windows-command-prompt-tricks-you-probably-dont-know/

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: