Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any way to automatically save command history to a file in cmd.exe, similar to bash's bash_history?

I am aware that one can do

doskey /history 

to save the command history at a particular point in time, but I wonder if there's a way to proactively save command history to a file, as the commands are being issued.

Once a command prompt is closed, the history is lost, so it's easy to accidentally close a command prompt when one is done.

I'd like to be able to say something like:

log Commands.log

and then issue my commands, and have the commands be saved to Commands.log.

like image 826
merlin2011 Avatar asked Mar 03 '12 00:03

merlin2011


1 Answers

I know it is late but I can see two alternatives.

Firt clink or something more complete that include cmder

Each time you will open cmd it will be clink and it works great

like image 94
Novy Avatar answered Oct 26 '22 02:10

Novy