Pour ma boite, j'ai d� r�alis� un petit test avec un noyau 2.4 (ma
machine �tait la seul en 2.4 � l'�poque). Le test consistait � cr�e un
fichier de plus de 4Gb. Pas de probl�me, je tente l'aventure avec un
fichier � trou:
$ dd if=/dev/zero of=/tmp/big bs=1M seek=4096 count=1
dd: /tmp/big: Invalid argument
1+0 records in
1+0 records out
$ ls -l /tmp/big
ls: /tmp/big: Value too large for defined data type
$ /bin/rm -f /tmp/big
/bin/rm: cannot remove `/tmp/big': Value too large for defined data type
$ echo /tmp/big*
/tmp/big
Et oui, stat/lstat/fstat sont maintenant old_stat/old_lstat/old_fstat et
retournent maintenant EOVERFLOW si la taille du fichier n'est pas
exprimable avec 32 bits. J'ai aussi eu un petit message du noyau, fort
gentil au demeurant:
EXT2-fs warning (device sd(8,6)): ext2_update_dynamic_rev: updating to rev
1 because of new feature flag, running e2fsck is recommended
Ce filesystem n'est plus montable par un noyau 2.2.x :-(
Je me suis dit que ce n'�tait pas un probl�me mais bien que le noyau
sache g�rer les fichiers de plus de 4Gb _aucun_ programme user n'est
capable de travailler avec :-(
Allez, deux solutions pour supprimer ce gros fichier:
. via un source C:
main() { unlink("/tmp/big"); }
. via deux commandes:
$ dd if=/dev/zero of=/tmp/big bs=1k count=1
1+0 records in
1+0 records out
$ ls -l /tmp/big
-rw-r--r-- 1 egp users 1024 Jun 14 10:17 /tmp/big
$ rm -f /tmp/big
$ ls -l /tmp/big
ls: /tmp/big: No such file or directory
Vous serez pr�venus.
--
Edouard G. Parmelan
http://egp.free.fr