as discussed already here on SU there is a way to output the current date and time in cmder.

In some videos on Youtube i saw some people installing something or get node.js ready or any other command that takes a while. When this command was finished the terminal ( don't know wich one :( ) showed "22s" for example.

Is this possible too in cmder? If yes, how? Any full scripts or hints are welcome.

Thank you.


The Unix "time" command will show this. This is a rather simple command, so it probably has been ported through CygWin or one of the lightweight variations, MSYS2 or MinGW.

In particular, MSYS2 tends to be less overhead than those other variations, and Geert Janssens's answer to d9k's Stackoverflow question mentions the time command built into the MSYS Shell having a time command. https://sourceforge.net/projects/mingw/files/MSYS/Base/bash/bash-3.1.23-1/ says that bash is MSYS's shell, so you may want to download MSYS Bash. (That last hyperlink has documentation mentioning the 4 runtime files needed, which are also available from the same site.)

Alternative(s): If using JP Software's command prompts (TCC/LE, TCC, or the old 4NT) then you can use the built-in "TIMER" command (with parameters to oversee multiple timers, if desired).

I would expect "cmder" to be able to run those shells with a parameter to run the desired command (unless it has a built-in "time" or "timer" command that provides similar functionality).

Note that CMD.exe has a built-in command called "time", so if you find out that you have a "time" command available, don't get too excited until you figure out whether that acts like CMD's command (which just shows the current time) or acts like Unix time.

You could also try: "CMD /C Echo %TIME%" if you want a very easy way to just have a log of when commands start/end.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.