Skip to content
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

"du" reporting incorrect precision e.g. terabytes when size is gigabytes #2434

Closed
neilgolden opened this issue Aug 18, 2017 · 3 comments
Closed

Comments

@neilgolden
Copy link

Windows build number: 10.0.15063

What's happening:

du is reporting three additional digits of precision, and incorrect units with -h, e.g. "T" for sizes in gigabytes

owner@Owner-PC:/mnt/c/Users/Owner/VirtualBox VMs$ du *
512003  Arch/Logs
0       Arch/Snapshots
2763520005      Arch
411651  Debian 8/Logs
157685761       Debian 8/Snapshots
8495859718      Debian 8

owner@Owner-PC:/mnt/c/Users/Owner/VirtualBox VMs$ du -h *
501M    Arch/Logs
0       Arch/Snapshots
2.6T    Arch
403M    Debian 8/Logs
151G    Debian 8/Snapshots
8.0T    Debian 8

owner@Owner-PC:/mnt/c/Users/Owner/VirtualBox VMs$ df -h
Filesystem      Size  Used Avail Use% Mounted on
rootfs          232G  195G   37G  85% /
data            232G  195G   37G  85% /data
[...]

owner@Owner-PC:/mnt/c/Users/Owner/VirtualBox VMs$ du --version
du (GNU coreutils) 8.25
  • What should be happening:

Behavior of Cygwin64 for comparison:

Owner@Owner-PC /cygdrive/c/Users/Owner/VirtualBox VMs
$ du *
1000    Arch/Logs
0       Arch/Snapshots
5397500 Arch
804     Debian 8/Logs
307980  Debian 8/Snapshots
16593476        Debian 8

Owner@Owner-PC /cygdrive/c/Users/Owner/VirtualBox VMs
$ du -h *
1000K   Arch/Logs
0       Arch/Snapshots
5.2G    Arch
804K    Debian 8/Logs
301M    Debian 8/Snapshots
16G     Debian 8

Owner@Owner-PC /cygdrive/c/Users/Owner/VirtualBox VMs
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
C:/cygwin64     232G  195G   37G  85% /

Owner@Owner-PC /cygdrive/c/Users/Owner/VirtualBox VMs
$ du --version
du (GNU coreutils) 8.26
Packaged by Cygwin (8.26-2)
@benhillis
Copy link
Member

This looks like a duplicate of #1894.

@neilgolden
Copy link
Author

Thank you!

@toastyghost
Copy link

+1, was quite confused as to how my storage drive's capacity reached such magnitudes with no noticeable quality gain

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

No branches or pull requests

3 participants