I made a pleasant discovery yesterday about linux (kernal 2.2.16). The
linux command df (report filesystem disk space usage) has a "metric"
switch available. Whereas the normal df command reads out in kilobytes
and megabytes, adding the -H  or --si switch as in "df -H" or "df --si"
alters the readout to do "likewise, but use powers of 1000 not 1024". Of
course, there's nothing "si" about 1000, per se, but the thought was
there. The du command (estimate file space usage) has the same switch
available. I saw nothing about kibibytes or mebibytes (using the IEC
binary prefixes). The Solaris system I use down at the college does not
have these options available for df and du.

Here's an example comparing three versions of the command:
jim@metric:~ > df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/hde5              4632462   2568667   1871981  58% /
/dev/hde7              4950048   1804773   2940287  38% /home
jim@metric:~ > df -H
Filesystem            Size  Used Avail Use% Mounted on
/dev/hde5             4.7G  2.6G  1.9G  58% /
/dev/hde7             5.1G  1.8G  3.0G  38% /home
jim@metric:~ > df --si
Filesystem            Size  Used Avail Use% Mounted on
/dev/hde5             4.7G  2.6G  1.9G  58% /
/dev/hde7             5.1G  1.8G  3.0G  38% /home 

Jim

-- 
Metric Methods(SM)           "Don't be late to metricate!"
James R. Frysinger, CAMS     http://www.metricmethods.com/
10 Captiva Row               e-mail: [EMAIL PROTECTED]
Charleston, SC 29407         phone/FAX:  843.225.6789

Reply via email to