From owner-freebsd-bugs Tue Apr 30 5:53:44 2002 Delivered-To: freebsd-bugs@freebsd.org Received: from areilly.bpc-users.org (CPE-144-132-240-160.nsw.bigpond.net.au [144.132.240.160]) by hub.freebsd.org (Postfix) with SMTP id C6BAB37B41B for ; Tue, 30 Apr 2002 05:53:38 -0700 (PDT) Received: (qmail 4370 invoked from network); 30 Apr 2002 12:53:38 -0000 Received: from localhost (andrew@127.0.0.1) by localhost with SMTP; 30 Apr 2002 12:53:38 -0000 Subject: Re: xterm & directory cat From: Andrew Reilly To: ANdrei Cc: fs@freebsd.org, bugs@freebsd.org In-Reply-To: <3CCE8982.6A915F2B@abc.ro> References: <3CCE8982.6A915F2B@abc.ro> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.3 Date: 30 Apr 2002 22:53:38 +1000 Message-Id: <1020171218.3085.26.camel@gurney.reilly.home> Mime-Version: 1.0 Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tue, 2002-04-30 at 22:09, ANdrei wrote: > why is it possible to do a "cat" o a directory in freebsd? and, if this Why would it not be? Directories in any unix system are just files. Well, they have slightly more significance than files, but behave as files in many respects. The format is binary, and consists of the text string of the name and the inode number of the file. > is intended (for whatever purpose, but i can't think of any > reasonable...), maybe others can verify that this crashes your xterm, if > you run this command form a xterm under X... actually, it changes your > character set (or whatever, i'm not much into how this works), but the > effect is that you can't use your terminal any more (in a normal way :) That will happen if you cat just about _any_ binary file. Xterm emulates an ANSI terminal, and some combinations of random binary characters are quite likely to be interpreted as control sequences that could do just about anything. Putting the terminal into a funny mode is very likely. Try using hd or less instead: they display the non-ASCII characters more usefully. > hope i'm not missing smtg, and this really s a bug, and i'm posting to > the right lists... Not sure what the right list would be. Perhaps -questions. It's not a bug, anyway. > feedback is appreciated, but please cc me, cause i'm not subscribed... OK. -- Andrew To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message