GNU bug report logs - #77252
cat lost content when used in cmd.exe

Previous Next

Package: coreutils;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 77252 in the body.
You can then email your comments to 77252 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#77252; Package coreutils. (Tue, 25 Mar 2025 14:46:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "anmikf" <anmikf <at> qq.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Tue, 25 Mar 2025 14:46:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "anmikf" <anmikf <at> qq.com>
To: "bug-coreutils" <bug-coreutils <at> gnu.org>
Subject: cat lost content when used in cmd.exe
Date: Tue, 25 Mar 2025 15:55:53 +0800
[Message part 1 (text/plain, inline)]
English is not my native language; please excuse typing errors.please read attachment "catbug"
[Message part 2 (text/html, inline)]
[catbug (application/octet-stream, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#77252; Package coreutils. (Tue, 25 Mar 2025 17:19:01 GMT) Full text and rfc822 format available.

Message #8 received at 77252 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: anmikf <anmikf <at> qq.com>, 77252 <at> debbugs.gnu.org
Subject: Re: bug#77252: cat lost content when used in cmd.exe
Date: Tue, 25 Mar 2025 17:18:09 +0000
On 25/03/2025 07:55, anmikf via GNU coreutils Bug Reports wrote:
> English is not my native language; please excuse typing errors.please read attachment "catbug"

That's too large a file to send to a mailing list really.
In essence the data is this I think:

  { yes 111122223333444455556666777788889999 | head -n51366; echo ABC: }

I don't understand your problem.
Are you saying everything is output except the letter 'B' from the above?
What --version of cat is this?

You may find an online LLM useful
for generating the bug report.

thank you,
Pádraig.




Information forwarded to bug-coreutils <at> gnu.org:
bug#77252; Package coreutils. (Wed, 26 Mar 2025 13:01:02 GMT) Full text and rfc822 format available.

Message #11 received at 77252 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: anmikf <anmikf <at> qq.com>, 77252 <at> debbugs.gnu.org
Subject: Re: 回复: bug#77252: cat lost content when used in cmd.exe
Date: Wed, 26 Mar 2025 13:00:05 +0000
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




Added tag(s) notabug. Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Wed, 26 Mar 2025 13:01:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 77252 <at> debbugs.gnu.org and "anmikf" <anmikf <at> qq.com> Request was from Pádraig Brady <P <at> draigBrady.com> to control <at> debbugs.gnu.org. (Wed, 26 Mar 2025 13:01:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 24 Apr 2025 11:26:14 GMT) Full text and rfc822 format available.

This bug report was last modified 54 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.