bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22363: Bug of stat in bash


From: Arturo
Subject: bug#22363: Bug of stat in bash
Date: Wed, 13 Jan 2016 15:14:04 +0000 (UTC)

Hi.
I've needed isolate the size of a directory writing a script. I've used "stat -c %s directory", but the result is a great surprise. You can view the image stat.jpg: the size of /var/cache/apt/archives is 9804 KB (10 MB aprox.), but stat shows "159744". This number is the same if the directory have 60 MB, 10 MB or 0 MB. In other equal instalation (Ubuntu 14.04) this number showed 4096 with more than 300 MB in the same directory.
In the stat2.jpg image you can view the same situation with the directory empty.
It's a bug? The way to obtain my goal (only the number) is another? I've read the manual of stat and I can't discover another way. Reading pages in Internet, this is the way explained to achieve my goal...
My system: Ubuntu 14.04; Terminal: Gnome 3.6.2.
Thanks for your attention.
 
                                          Arturo

Attachment: stat.jpg
Description: JPEG image

Attachment: stat2.jpg
Description: JPEG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]