8000 Incorrect size · Issue #13 · sindresorhus/df · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Incorrect size #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
julien-f opened this issue Feb 17, 2021 · 2 comments
Open

Incorrect size #13

julien-f opened this issue Feb 17, 2021 · 2 comments

Comments

@julien-f
Copy link
julien-f commented Feb 17, 2021

df output:

$ df --version
df (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Torbjorn Granlund, David MacKenzie, and Paul Eggert.
$ df -kP /run/xo-server/mounts/cbb36e4c-3353-4126-8588-18ba25697403
Filesystem                  1024-blocks  Used    Available Capacity Mounted on
xx.xxx.xxx.xx:/xxxxxxxxxxx 198640150528 43008 198640107520       1% /run/xo-server/mounts/cbb36e4c-3353-4126-8588-18ba25697403

This module result:

{
  filesystem: '10.190.111.25:/backupdrive 1',
  size: 101007514140672,
  used: 44040192,
  available: 203407470100480,
  capacity: 0.01,
  mountpoint: '/run/xo-server/mounts/cbb36e4c-3353-4126-8588-18ba25697403'
}

Dump boundaries: [ 28, 11, 6, 13, 9, -1 ]

Dump cl:

[
  '10.190.111.25:/backupdrive 1',
  '98640150528',
  '43008',
  '198640107520',
  '1%',
  '/run/xo-server/mounts/cbb36e4c-3353-4126-8588-18ba25697403'
]

The size field appears to be missing the first character.

@sindresorhus
Copy link
Owner

Using https://github.com/sindresorhus/parse-columns here would probably fix that.

@sindresorhus
Copy link
Owner

Possible solution described here: #14 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
0