mainGNU Core Utilities - Support: sr #110951, Strange behaviour when use -h...


You are not allowed to post comments on this tracker with your current authentication level.

sr #110951: Strange behaviour when use -h option in du.c

Submitter:  None
Submitted:  Tue 31 Oct 2023 09:53:06 AM UTC
Category:  None Priority:  5 - Normal
Severity:  2 - Minor Status:  None
Privacy:  Public Assigned to:  None
Originator Email:  -email is unavailable- Open/Closed:  Open
Operating System:  GNU/Linux

Tue 31 Oct 2023 09:53:06 AM UTC, original submission:  

I don't known if this is a rigth place to open a support/issue, if isn't I'm sorry!

= State of local machine

- coreutils 9.1
- kernel version 6.5.7-100
- OS fc37.x86_64
- GNU bash, version 5.2.15(1)-release (x86_64-redhat-linux-gnu)
- bash terminal KDE Konsole 23.04.3

= Tested commands

- $du -h -a /home/<my_home_dir>/ | sort -r | head -n 10
- $du -a /home/<my_home_dir>/ | sort -r | head -n 10

how can you see: with and without -h option.

= Scenario

When I run the below commands the output results are different! Just this is very strange, because the only difference between two command is the human-readable option. But how can you see from the attached figure, the beahviour is so strange:

  • 1. the listed files/path are different (but not the last 2 items - labeled with "996 size")
  • 2. the size of paths apparently remains the same but the paths are different (9.9M ~ 9992K but the first item/path listed by the first command is different than the first item/path listed by the second command)
  • 3. finally if you see the size of the file "red X - file: ncpa-2-0-0.exe", listed only by the second command, this is not correspond/equals to the output of the command ls -la as you can see in attacched figure.

I'm sorry for eventually confusion!




(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #55294:  du_beahaviour.png added by None (251KiB - image/png)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-31 None Attached File- Added du_beahaviour.png, #55294

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code