Windows command prompt still in the 80’s

I sometimes wonder if `cmd.exe` will ever get the -h treatment a lot of unixy tools have received… `dir` is definitely still living in the MS-DOS era. For example:

T:\>dir v:
 Volume in drive V is video
 Volume Serial Number is 0254-04EC

 Directory of V:\

26/07/2010  09:22    <DIR>          .
04/06/2010  09:56    <DIR>          ..
26/02/2010  10:41    <DIR>          DVD
04/10/2010  13:12    <DIR>          TV
22/03/2008  13:41    <DIR>          TiVo
26/02/2010  10:41    <DIR>          inbound
21/05/2010  09:57    <DIR>          redux
12/06/2010  19:40     1,900,601,954 Dance Recital.mp4
               1 File(s)  1,900,601,954 bytes
               8 Dir(s)  4,612,702,208,000 bytes free

For those that don’t get it, that’s 4.6TiB available. Why not say “4.6TiB”… or even “4.2TB” or at least provide a switch to do so? Most Unixish tools have -h and -H options to do just this. The same file system, but on the file server:

chrisy@baud:~$ df -H /data
Filesystem             Size   Used  Avail Use% Mounted on
/dev/mapper/vmraw-data
                       8.0T   3.4T   4.6T  42% /data

chrisy@baud:~$ df -h /data
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vmraw-data
                      7.3T  3.1T  4.2T  42% /data

The difference between the two being whether it uses 1000 or 1024 as the divisor.