Saari Development

Ali Rizvi's Technical Blog as a Professional Software Development Engineer

Windows: Printing Date and Time on Command Line

with one comment

I am more of a *nix (unix, linux etc) command line person but I still use windows from time to time (in this case because my macbook pro crashed).

I often want to see the progress of output to a file over time using the following linux command line:

$ date; wc -l output.txt

On windows date does not print time (you have to do ‘date \t’ to get output from it otherwise it used for changing the system date).

I finally found what I was looking for:

> echo %DATE% & echo %TIME% & wc -l output.txt


Thu 07/21/2011
375 output.txt


The wc command and bunch of other unix commands come from the free UnixUtils opensource package for windows. I consider UnixUtils a must have for windows and among the first thing I install on my windows machine.


Written by imsaar

July 21, 2011 at 12:44 pm

Posted in windows

One Response

Subscribe to comments with RSS.

  1. Nice tip about UnixUtils. I am glad you are still tinkering with Windows and as for the MacBook Pro crashing… I only wonder, had it been windows, what choice words would you be using for Microsoft right now. In this fiasco, I see no bile spewed towards and Apple and Jobs. This is fascinating! 🙂

    I have been very heavy into Linux in the last few days and I recommend using Wubi to install Ubuntu on your Windows box to dual boot in Linux without creating a partition.

    Arsalan A.

    September 20, 2011 at 5:18 am

Leave a Reply

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

You are commenting using your 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: