From unknown Mon Jun 23 13:11:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9344: about the command of 'cat' Resent-From: =?UTF-8?Q?=E5=8D=9A=E9=AB=98?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 22 Aug 2011 20:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9344 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 9344@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.131404340510429 (code B ref -1); Mon, 22 Aug 2011 20:04:02 +0000 Received: (at submit) by debbugs.gnu.org; 22 Aug 2011 20:03:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QvaiR-0002i8-9S for submit@debbugs.gnu.org; Mon, 22 Aug 2011 16:03:25 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qva7r-0008Cj-Vy for submit@debbugs.gnu.org; Mon, 22 Aug 2011 15:25:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qva5P-0005T5-7w for submit@debbugs.gnu.org; Mon, 22 Aug 2011 15:23:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:54834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qva5J-0005Rk-Q4 for submit@debbugs.gnu.org; Mon, 22 Aug 2011 15:23:02 -0400 Received: from eggs.gnu.org ([140.186.70.92]:54858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qva4H-0002ha-L7 for bug-coreutils@gnu.org; Mon, 22 Aug 2011 15:21:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qva4G-0005Ho-MD for bug-coreutils@gnu.org; Mon, 22 Aug 2011 15:21:53 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:47031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qva4G-0005Hi-Il for bug-coreutils@gnu.org; Mon, 22 Aug 2011 15:21:52 -0400 Received: by vxj3 with SMTP id 3so5313261vxj.0 for ; Mon, 22 Aug 2011 12:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=fr2q2FwbMvaaKQjHXWkwUjVhvBawWqfRD3Qr04PEcFQ=; b=wxPw7Fd7nFGoe1psVsUSWVJuGF1NviqnDCc6Ud+S/vD3kHu77Vj1RR7BtA0BR5XH/1 ABdPshkQ4z/O6RICjuxht9JnAdcZy9AbpVSyhpjRZuKRX9mSNEUIMuNCz9zagaMbyfJF Df/vTZ0lTYtu2HtwrhfQbasvv+XQmMkG37850= MIME-Version: 1.0 Received: by 10.52.28.80 with SMTP id z16mr1308130vdg.75.1314040911717; Mon, 22 Aug 2011 12:21:51 -0700 (PDT) Received: by 10.52.183.40 with HTTP; Mon, 22 Aug 2011 12:21:51 -0700 (PDT) Date: Tue, 23 Aug 2011 03:21:51 +0800 Message-ID: From: =?UTF-8?Q?=E5=8D=9A=E9=AB=98?= Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Mailman-Approved-At: Mon, 22 Aug 2011 16:03:21 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hello: I am a user of ubuntu 10.04.2.While I am trying to use 'cat' to display a binary file.....Every letter on my display goes wrong.... yours GB from China From debbugs-submit-bounces@debbugs.gnu.org Mon Aug 22 16:16:28 2011 Received: (at control) by debbugs.gnu.org; 22 Aug 2011 20:16:28 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qvav6-0003iF-7y for submit@debbugs.gnu.org; Mon, 22 Aug 2011 16:16:28 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qvav2-0003hx-K7; Mon, 22 Aug 2011 16:16:25 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 654632141A; Mon, 22 Aug 2011 14:14:00 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 3B75A2DC7F; Mon, 22 Aug 2011 14:14:00 -0600 (MDT) Date: Mon, 22 Aug 2011 14:14:00 -0600 From: Bob Proulx To: =?utf-8?B?5Y2a6auY?= Subject: Re: bug#9344: about the command of 'cat' Message-ID: <20110822201400.GA5793@hysteria.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: control Cc: 9344-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) tags 9344 + notabug thanks =E5=8D=9A=E9=AB=98 wrote: > Hello: > I am a user of ubuntu 10.04.2.While I am trying to use 'cat' to > display a binary file.....Every letter on my display goes wrong.... > yours GB from China The 'cat' program copies each file to standard output concatenating files. It is working properly. What you are seeing are the contents of the files to the terminal. Whether the terminal can display that binary data or not is not a bug in cat. Your data is almost certainly in a character encoding that is not understood by the terminal. You could reconfigure the terminal or recode the file into a different characer set. Since the purpose of 'cat' is to concatenate files it must not modify or filter the files in the process. What goes in should come out. The 'cat' program is typically used to assemble parts of files together. It is doing that correctly. To browse files you should use a file browser such as 'more', 'less', 'most', or other programs that act as terminal pagers. For binary files it may be more useful to use 'od -tx1', 'hexdump', 'xxd' or other program that converts binary data into text codes and then piping the output to a pager. It is historically traditional on Unix-like systems to use cat to write short text files to the terminal. However this is done with full knowledge that it only behaves as desired on short text files that do not contain terminal control sequences. If they do then the user running cat to write the file to the terminal must be prepared to accept the consequences and be able to reset the terminal if needed. Since this is not a bug in cat but instead a misuse of it I am going to close the bug report. Hope this helps, Bob From unknown Mon Jun 23 13:11:16 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: =?UTF-8?Q?=E5=8D=9A=E9=AB=98?= Subject: bug#9344: closed (Re: bug#9344: about the command of 'cat') Message-ID: References: <20110822201400.GA5793@hysteria.proulx.com> X-Gnu-PR-Message: they-closed 9344 X-Gnu-PR-Package: coreutils X-Gnu-PR-Keywords: notabug Reply-To: 9344@debbugs.gnu.org Date: Mon, 22 Aug 2011 20:17:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1314044222-14329-1" This is a multi-part message in MIME format... ------------=_1314044222-14329-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #9344: about the command of 'cat' which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 9344@debbugs.gnu.org. --=20 9344: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9344 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1314044222-14329-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 9344-done) by debbugs.gnu.org; 22 Aug 2011 20:16:27 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qvav4-0003i7-CX for submit@debbugs.gnu.org; Mon, 22 Aug 2011 16:16:27 -0400 Received: from joseki.proulx.com ([216.17.153.58]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qvav2-0003hx-K7; Mon, 22 Aug 2011 16:16:25 -0400 Received: from hysteria.proulx.com (hysteria.proulx.com [192.168.230.119]) by joseki.proulx.com (Postfix) with ESMTP id 654632141A; Mon, 22 Aug 2011 14:14:00 -0600 (MDT) Received: by hysteria.proulx.com (Postfix, from userid 1000) id 3B75A2DC7F; Mon, 22 Aug 2011 14:14:00 -0600 (MDT) Date: Mon, 22 Aug 2011 14:14:00 -0600 From: Bob Proulx To: =?utf-8?B?5Y2a6auY?= Subject: Re: bug#9344: about the command of 'cat' Message-ID: <20110822201400.GA5793@hysteria.proulx.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 9344-done Cc: 9344-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) tags 9344 + notabug thanks =E5=8D=9A=E9=AB=98 wrote: > Hello: > I am a user of ubuntu 10.04.2.While I am trying to use 'cat' to > display a binary file.....Every letter on my display goes wrong.... > yours GB from China The 'cat' program copies each file to standard output concatenating files. It is working properly. What you are seeing are the contents of the files to the terminal. Whether the terminal can display that binary data or not is not a bug in cat. Your data is almost certainly in a character encoding that is not understood by the terminal. You could reconfigure the terminal or recode the file into a different characer set. Since the purpose of 'cat' is to concatenate files it must not modify or filter the files in the process. What goes in should come out. The 'cat' program is typically used to assemble parts of files together. It is doing that correctly. To browse files you should use a file browser such as 'more', 'less', 'most', or other programs that act as terminal pagers. For binary files it may be more useful to use 'od -tx1', 'hexdump', 'xxd' or other program that converts binary data into text codes and then piping the output to a pager. It is historically traditional on Unix-like systems to use cat to write short text files to the terminal. However this is done with full knowledge that it only behaves as desired on short text files that do not contain terminal control sequences. If they do then the user running cat to write the file to the terminal must be prepared to accept the consequences and be able to reset the terminal if needed. Since this is not a bug in cat but instead a misuse of it I am going to close the bug report. Hope this helps, Bob ------------=_1314044222-14329-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Aug 2011 20:03:25 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QvaiR-0002i8-9S for submit@debbugs.gnu.org; Mon, 22 Aug 2011 16:03:25 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qva7r-0008Cj-Vy for submit@debbugs.gnu.org; Mon, 22 Aug 2011 15:25:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qva5P-0005T5-7w for submit@debbugs.gnu.org; Mon, 22 Aug 2011 15:23:12 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:54834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qva5J-0005Rk-Q4 for submit@debbugs.gnu.org; Mon, 22 Aug 2011 15:23:02 -0400 Received: from eggs.gnu.org ([140.186.70.92]:54858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qva4H-0002ha-L7 for bug-coreutils@gnu.org; Mon, 22 Aug 2011 15:21:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qva4G-0005Ho-MD for bug-coreutils@gnu.org; Mon, 22 Aug 2011 15:21:53 -0400 Received: from mail-vx0-f169.google.com ([209.85.220.169]:47031) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qva4G-0005Hi-Il for bug-coreutils@gnu.org; Mon, 22 Aug 2011 15:21:52 -0400 Received: by vxj3 with SMTP id 3so5313261vxj.0 for ; Mon, 22 Aug 2011 12:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=fr2q2FwbMvaaKQjHXWkwUjVhvBawWqfRD3Qr04PEcFQ=; b=wxPw7Fd7nFGoe1psVsUSWVJuGF1NviqnDCc6Ud+S/vD3kHu77Vj1RR7BtA0BR5XH/1 ABdPshkQ4z/O6RICjuxht9JnAdcZy9AbpVSyhpjRZuKRX9mSNEUIMuNCz9zagaMbyfJF Df/vTZ0lTYtu2HtwrhfQbasvv+XQmMkG37850= MIME-Version: 1.0 Received: by 10.52.28.80 with SMTP id z16mr1308130vdg.75.1314040911717; Mon, 22 Aug 2011 12:21:51 -0700 (PDT) Received: by 10.52.183.40 with HTTP; Mon, 22 Aug 2011 12:21:51 -0700 (PDT) Date: Tue, 23 Aug 2011 03:21:51 +0800 Message-ID: Subject: about the command of 'cat' From: =?UTF-8?B?5Y2a6auY?= To: bug-coreutils@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.9 (-----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Mon, 22 Aug 2011 16:03:21 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.9 (-----) Hello: I am a user of ubuntu 10.04.2.While I am trying to use 'cat' to display a binary file.....Every letter on my display goes wrong.... yours GB from China ------------=_1314044222-14329-1-- From unknown Mon Jun 23 13:11:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9344: about the command of 'cat' Resent-From: =?UTF-8?Q?P=C3=A1draig?= Brady Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Mon, 22 Aug 2011 22:39:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9344 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: =?UTF-8?Q?=E5=8D=9A=E9=AB=98?= Cc: 9344@debbugs.gnu.org Received: via spool by 9344-submit@debbugs.gnu.org id=B9344.131405274018518 (code B ref 9344); Mon, 22 Aug 2011 22:39:02 +0000 Received: (at 9344) by debbugs.gnu.org; 22 Aug 2011 22:39:00 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qvd90-0004oc-SF for submit@debbugs.gnu.org; Mon, 22 Aug 2011 18:39:00 -0400 Received: from mail1.vodafone.ie ([213.233.128.43]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qvd8y-0004oU-NP for 9344@debbugs.gnu.org; Mon, 22 Aug 2011 18:38:57 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApMBAEzZUk5tTHJJ/2dsb2JhbAAMNYRLpggBAQUjDwFGEAkCDQsCAgUWCwICCQMCAQIBRQYNAQcBAat2kVyBLIQMgRAEmD6LTg Received: from unknown (HELO [192.168.1.79]) ([109.76.114.73]) by mail1.vodafone.ie with ESMTP; 22 Aug 2011 23:36:31 +0100 Message-ID: <4E52D9EE.1040802@draigBrady.com> Date: Mon, 22 Aug 2011 23:36:30 +0100 From: =?UTF-8?Q?P=C3=A1draig?= Brady User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:5.0) Gecko/20110707 Thunderbird/5.0 MIME-Version: 1.0 References: In-Reply-To: X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.6 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 08/22/2011 08:21 PM, 博高 wrote: > Hello: > I am a user of ubuntu 10.04.2.While I am trying to use 'cat' to > display a binary file.....Every letter on my display goes wrong.... > yours GB from China There was probably a character sequence in the binary file to put your terminal into an alternate character set mode. For example try: tput smacs; echo abcd; tput rmacs If your terminal is messed up, the `reset` command (even if you can't see what you're typing), will fix things. Also note the `cat -v` and `od -Ax -tx1z -v` coreutils commands for viewing binary files. cheers, Pádraig. From unknown Mon Jun 23 13:11:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#9344: closed (Re: bug#9344: about the command of 'cat') Resent-From: =?UTF-8?Q?=E5=8D=9A=E9=AB=98?= Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 23 Aug 2011 04:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9344 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: notabug To: 9344@debbugs.gnu.org Received: via spool by 9344-submit@debbugs.gnu.org id=B9344.131407383516043 (code B ref 9344); Tue, 23 Aug 2011 04:31:01 +0000 Received: (at 9344) by debbugs.gnu.org; 23 Aug 2011 04:30:35 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QvidG-0004Ah-Dc for submit@debbugs.gnu.org; Tue, 23 Aug 2011 00:30:35 -0400 Received: from mail-vw0-f44.google.com ([209.85.212.44]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QvhOb-0006g9-Kl for 9344@debbugs.gnu.org; Mon, 22 Aug 2011 23:11:22 -0400 Received: by vws12 with SMTP id 12so4452138vws.3 for <9344@debbugs.gnu.org>; Mon, 22 Aug 2011 20:08:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=v2YWyQuCykzYTj/+SJ5wFTZfv7PKvxbZOlm8e5DfDiQ=; b=Z3xR8d+F4SZZgv1L7Kjg3JGeD1kP9wrzTMhf1B/QsV38rJ7kaxkx1BgSPL1WdSi7Me kjgby2t/Ke3Gsc9FGPGArGn8cvMB434Ib18ZKRLObxbGhBEVqGsAXbtJku9Lr/QCJoeK 34c5Qd8ATRXueQSFvtc5goN+lxCNDwEGoCgbo= MIME-Version: 1.0 Received: by 10.52.28.80 with SMTP id z16mr1655871vdg.75.1314068935934; Mon, 22 Aug 2011 20:08:55 -0700 (PDT) Received: by 10.52.183.40 with HTTP; Mon, 22 Aug 2011 20:08:55 -0700 (PDT) In-Reply-To: References: <20110822201400.GA5793@hysteria.proulx.com> Date: Tue, 23 Aug 2011 11:08:55 +0800 Message-ID: From: =?UTF-8?Q?=E5=8D=9A=E9=AB=98?= Content-Type: text/plain; charset=Big5 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -4.8 (----) X-Mailman-Approved-At: Tue, 23 Aug 2011 00:30:33 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.4 (----) Thanks very much On Tue, Aug 23, 2011 at 4:17 AM, GNU bug Tracking System wrote: > Your bug report > > #9344: about the command of 'cat' > > which was filed against the coreutils package, has been closed. > > The explanation is attached below, along with your original report. > If you require more details, please reply to 9344@debbugs.gnu.org. > > -- > 9344: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9344 > GNU Bug Tracking System > Contact help-debbugs@gnu.org with problems > > > ---------- Forwarded message ---------- > From: Bob Proulx > To: =B3=D5=B0=AA > Date: Mon, 22 Aug 2011 14:14:00 -0600 > Subject: Re: bug#9344: about the command of 'cat' > tags 9344 + notabug > thanks > > =B3=D5=B0=AA wrote: >> Hello: >> I am a user of ubuntu 10.04.2.While I am trying to use 'cat' to >> display a binary file.....Every letter on my display goes wrong.... >> yours GB from China > > The 'cat' program copies each file to standard output concatenating > files. It is working properly. What you are seeing are the contents > of the files to the terminal. Whether the terminal can display that > binary data or not is not a bug in cat. Your data is almost certainly > in a character encoding that is not understood by the terminal. You > could reconfigure the terminal or recode the file into a different > characer set. > > Since the purpose of 'cat' is to concatenate files it must not modify > or filter the files in the process. What goes in should come out. > The 'cat' program is typically used to assemble parts of files > together. It is doing that correctly. > > To browse files you should use a file browser such as 'more', 'less', > 'most', or other programs that act as terminal pagers. For binary > files it may be more useful to use 'od -tx1', 'hexdump', 'xxd' or > other program that converts binary data into text codes and then > piping the output to a pager. > > It is historically traditional on Unix-like systems to use cat to > write short text files to the terminal. However this is done with > full knowledge that it only behaves as desired on short text files > that do not contain terminal control sequences. If they do then the > user running cat to write the file to the terminal must be prepared to > accept the consequences and be able to reset the terminal if needed. > > Since this is not a bug in cat but instead a misuse of it I am going > to close the bug report. > > Hope this helps, > Bob > > > > ---------- Forwarded message ---------- > From: =B3=D5=B0=AA > To: bug-coreutils@gnu.org > Date: Tue, 23 Aug 2011 03:21:51 +0800 > Subject: about the command of 'cat' > Hello: > I am a user of ubuntu 10.04.2.While I am trying to use 'cat' to > display a binary file.....Every letter on my display goes wrong.... > yours GB from China > > > >