Skip to content

dd: status summary lacks GNU's FULL+PARTIAL record shape and time/rate suffix #1707

Closed

Description

@caomengxuan666

现象(WinuxCmd 1.2.1,origin/main f0cf6b1,C++ dd)

dd 的最终统计与 GNU 9.4 不同:

  1. records 只给单计数,缺 FULL+PARTIAL 形状(dd.c:816-836)。
  2. bytes copied 后缺 , <秒> s, <速率> kB/s(dd.c:780-790)。

复现(PowerShell,产品面)

'hello dd' | winuxcmd dd 2>err.txt | Out-Null
Get-Content err.txt

实际:

1 records in
1 records out
8 bytes copied

GNU 9.4:

0+1 records in
0+1 records out
8 bytes copied, 9.06e-05 s, 33.1 kB/s

status=noxfer 只应去掉尾行,GNU 仍保留 0+1 records in/out;产品同样缺 + 维度:

'abc' | winuxcmd dd status=noxfer 2>err.txt | Out-Null; Get-Content err.txt
# 1 records in / 1 records out

影响

shell 脚本常解析 ^[0-9]+\+[0-9]+ records(部分读/短块诊断);当前形状无法兼容。GNU 从 8.24 起固定该格式。

期望

  • 维护 r_full / r_partial 两个计数,打印 full+partial records in/out。
  • 默认与 status=progress 末尾打印 N bytes copied, <xtime> s, <human rate>;status=noxfer 仅省略该行。
  • 速率/时间可用 <RATE> 归一测试。

契约表锚点

DOCS/oracle-audit/dd.md 行 5/6/7;原始输出 dd-final.txt 的 01-stdin-stdout、05-status-noxfer。关联已关闭 #366(“bytes copied 不显示”)——该面已修,本条是形状/速率的剩余差。

Activity

  1. added
    compat-gap
    on Nov 14, 2026
  2. added
    bug
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcompat-gap

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions