I'm used to the
du command. I often use it with
I report the result in a text file which I use to track space consumers.
But I was wondered today to see a directory being reported as using 32 PB (PetaBytes). That's a lot on a 128 GB disk ....
So, my question is: Is this a bug in
du command or in the
du -h flag ?
And what additional check might I conduct on the FS knowing that the
ls command also reports some abnormal amount :
Shell = /bin/bash, Path = ~/.../data > ls -la total 39582418599960 drwxrwxr-x 2 user user 4096 jan 4 09:49 . drwxrwxr-x 4 user user 4096 jan 4 09:49 .. -rw-rw-r-- 1 user user 11330 jan 4 09:49 Fortress.dat -rw-rw-r-- 1 user user 54 jan 4 09:49 villages.dat
If I use other options with the
ls command, result differs :
Shell = /bin/bash Path = ~/.../data > ls -l total 16 -rw-rw-r-- 1 user user 11330 jan 4 09:49 Fortress.dat -rw-rw-r-- 1 user user 54 jan 4 09:49 villages.dat
If I use
du -a, I see the problem is on the current directory. That's why a simple
ls -l doesn't report the problem (it doesn't include the current directory in its report) :
Shell = /bin/bash Path = ~/.../data > du -a 12 ./Fortress.dat 4 ./villages.dat 39582418599956 .
Here are a few characteristics of my disk :
Disque /dev/sda : 128GB Taille des secteurs (logiques/physiques): 512B/512B Table de partitions : msdos Numéro Début Fin Taille Type Système de fichiers Fanions 1 1049kB 124GB 124GB primary ext4 démarrage 2 124GB 128GB 4083MB extended 5 124GB 128GB 4083MB logical linux-swap(v1)
Meanwhile, I read about "sparse" files which may change the reported size of the files. What I don't understand here is that the problem seems to be on a directory ... Are there sparse directories ??
Apart from this, there is no problem reproted on my SDD.
Thank for any advice ... Marc.