GNU bug report logs - #22363
Bug of stat in bash

Previous Next

Package: coreutils;

Reported by: Arturo <artblas <at> yahoo.es>

Date: Wed, 13 Jan 2016 16:50:01 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arturo <artblas <at> yahoo.es>
To: "bug-coreutils <at> gnu.org" <bug-coreutils <at> gnu.org>
Subject: Bug of stat in bash
Date: Wed, 13 Jan 2016 15:14:04 +0000 (UTC)
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]
[stat.jpg (image/jpeg, attachment)]
[stat2.jpg (image/jpeg, attachment)]

This bug report was last modified 9 years and 184 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.