how to look the usb free space in linux command line

C++
$ df -B 1 /dev/sdc1                                                            
Filesystem     1B-blocks    Used Available Use% Mounted on
/dev/sdc1      501760000 4358144 497401856   1% /media/xieerqi/HEXMEX

$ df -H /dev/sdc1                                                              
Filesystem      Size  Used Avail Use% Mounted on
/dev/sdc1       502M  4.4M  498M   1% /media/xieerqi/HEXMEX
[root@tecmint ~]# df -T

Filesystem		Type   1K-blocks  Used      Available Use% Mounted on
/dev/cciss/c0d0p2	ext3    78361192  23188812  51127616  32%   /
/dev/cciss/c0d0p5	ext3    24797380  22273432  1243972   95%   /home
/dev/cciss/c0d0p3	ext3    29753588  25503792  2713984   91%   /data
/dev/cciss/c0d0p1	ext3    295561     21531    258770    8%    /boot
tmpfs			tmpfs   257476         0    257476    0%   /dev/shm[root@tecmint ~]# df -hT /home

Filesystem		Type    Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p5	ext3     24G   22G  1.2G  95% /home[root@tecmint ~]# df -t ext3

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/cciss/c0d0p2     78361192  23190072  51126356  32% /
/dev/cciss/c0d0p5     24797380  22273432   1243972  95% /home
/dev/cciss/c0d0p3     29753588  25503792   2713984  91% /data
/dev/cciss/c0d0p1       295561     21531    258770   8% /boot[root@tecmint ~]# df -i

Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/cciss/c0d0p2    20230848  133143 20097705    1% /
/dev/cciss/c0d0p5    6403712  798613 5605099   13% /home
/dev/cciss/c0d0p3    7685440 1388241 6297199   19% /data
/dev/cciss/c0d0p1      76304      40   76264    1% /boot
tmpfs                  64369       1   64368    1% /dev/shm[root@tecmint ~]# df -x ext3

Filesystem           1K-blocks      Used Available Use% Mounted on
tmpfs                   257476         0    257476   0% /dev/shm
Source

Also in C++: