bug-coreutils
[Top][All Lists]
Advanced

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

bug#33303: hex id for file system is incorrect or non-standard using uil


From: Bernhard Voelker
Subject: bug#33303: hex id for file system is incorrect or non-standard using uil 'id'
Date: Wed, 7 Nov 2018 17:58:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1

tag 33303 notabug
close 33303
thanks

On 11/7/18 5:07 PM, L A Walsh wrote:
> Was looking to see when the underlying filesystem
> changed in a path.
> 
> I used:
>>  stat -f -c%f /
> 82100000000
> stat -f -c%i /var
> 82200000000
> 
> There are way too many zeros, not to mention being left justfied
> with zeros.
> 
> What I might expect to see is more like this:
> 821
> or
> 822

I think you didn't notice that -f changes the functionality of the "%f" format.

>From 'stat --help':

   -f, --file-system     display file system status instead of file status

   ...
   Valid format sequences for file systems:
   ...
      %f     free blocks in file system

You can see with strace that the printed value comes from 'f_bfree':

  $ strace -ve statfs stat -f -c '%f' /
  ...
  statfs("/", {..., f_bfree=1561242, ...}, ...) = 0
  1561242
  +++ exited with 0 +++

As such, I'm marking this as "not a bug" in our bug tracker.
Of course, discussion may continue, and we can re-open the issue if needed.

Have a nice day,
Berny





reply via email to

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