Tell the free disk space of a path in megabytes on the command line with one simple command line tool for Windows, Mac OS X and Linux.

sfk diskspace [dirname|-help]
sfk fsinfo [dirname]

show disk space and/or file system informations.
a folder name can be specified which relates
to a specific volume or hard disk.

   -byte[s]   all size infos in bytes
   -tab[s]    pure values, tab separated
   -bin[ary]  calculate with binary megabytes
              of 1048576 bytes each.

   space      same as diskspace
   filesys    same as fsinfo
   freespace  tell only free space

web reference

   sfk fsinfo
      tell details about the file system of the
      current directory (.)

   sfk fsinfo D:
      tell about the file system used for drive D:

   sfk space
      tell total and free MB of the current volume.
example outputs

  sfk space .

      totalmb=307383 freemb=6057

      just tells the total and free mb available in the volume
      of the current dir.

  sfk fsinfo .

      filesys="NTFS" volume="15234973 EXTDATA" totalmb=307383 freemb=6057

      tells also details of the current filesystem,
      volume ID and label.

  sfk space -bytes -tab +filter -tabform "$col2"


      get only the free space value in bytes. under linux, 
      use -tabform "#col2", or use the unified syntax
      -utabform "#col2" on all platforms.