Ca reste pas glop : un df sous linux donne un résultat différent d'un df sous solaris. Deux versions de df peuvent donner des résultats différents. Ca ajoute une dépendance à ton machin...
En principe, posix définit un df -P qui donne la même sortie quel que soit le système. Il me semble que le df de GNU et celui de Sun l'implémentent tous les deux.
The format of the default output from df is unspecified, but all space figures are reported in 512-byte units, unless the -k option is specified.
[...]
-P
Produce output in the format described in the STDOUT section.
[...]
The remaining output with -P shall consist of one line of information for each specified file system. These lines shall be formatted as follows:
"%s %d %d %d %d%% %s\n", <file system name>, <total space>,
<space used>, <space free>, <percentage used>,
<file system root>
In the following list, all quantities expressed in 512-byte units (1024-byte when -k is specified) shall be rounded up to the next higher unit. The fields are:
<file system name>
The name of the file system, in an implementation-defined format.
<total space>
The total size of the file system in 512-byte units. The exact meaning of this figure is implementation-defined, but should include <space used>, <space free>, plus any space reserved by the system not normally available to a user.
<space used>
The total amount of space allocated to existing files in the file system, in 512-byte units.
<space free>
The total amount of space available within the file system for the creation of new files by unprivileged users, in 512-byte units. When this figure is less than or equal to zero, it shall not be possible to create any new files on the file system without first deleting others, unless the process has appropriate privileges. The figure written may be less than zero.
<percentage used>
The percentage of the normally available space that is currently allocated to all files on the file system. This shall be calculated using the fraction:
<space used>/( <space used>+ <space free>)
expressed as a percentage. This percentage may be greater than 100 if <space free> is less than zero. The percentage value shall be expressed as a positive integer, with any fractional result causing it to be rounded to the next highest integer.
<file system root>
The directory below which the file system hierarchy appears.
Source : IEEE Std 1003.1