
To find the total and free disk space in all modern versions of Microsoft Windows from the command line, you need to use the fsutil [1] command. Here is an example:
fsutil volume diskfree c:
Total # of free bytes : 11658346496
Total # of bytes : 209712050176
Total # of avail free bytes : 11658346496
Unfortunately, there is no way to change the output from bytes to megabytes or gigabytes. If you want to learn how to find total and free disk space in Linux, check out this tutorial [2].