GNU bug report logs -
#77252
cat lost content when used in cmd.exe
Previous Next
Reported by: "anmikf" <anmikf <at> qq.com>
Date: Tue, 25 Mar 2025 14:46:02 UTC
Severity: normal
Tags: notabug
Done: Pádraig Brady <P <at> draigBrady.com>
Bug is archived. No further changes may be made.
Full log
Message #15 received at control <at> debbugs.gnu.org (full text, mbox):
tag 77252 notabug
close 77252
stop
On 26/03/2025 07:43, anmikf wrote:
> 在Git for windows的Git Bash里面执行`cat catbug`,文件内容能完全显示。
> 但是在Win10的cmd.exe里面执行`"C:\Program Files\Git\usr\bin\cat.exe" catbug`,文件内容不能完全显示,会丢失第51367行的字符'B',经过测试发现会丢失第1900544个字节。
> ------------------------
> Execute `cat catbug` in Git Bash for Windows, and the file content will be fully displayed.
> However, when executing `"C:\Program Files\Git\usr\bin\cat.exe" catbug` in cmd. exe of Win10, the file content cannot be fully displayed and the character 'B' on line 51367 will be lost. After testing, it was found that the 1900544th byte will be lost.
I think you're using version 8.32 of cat (according to https://packages.msys2.org/packages/coreutils)
You're having an issue on a 64KiB boundary, i.e. the first byte in a 64KiB buffer is not displayed.
I strongly suspect cmd.exe is at issue here not cat, as a bug like that in cat would not go unnoticed.
Also given it works under git bash for windows, that also absolves cat.exe from coreutils.
thanks,
Pádraig
This bug report was last modified 55 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.