Skip site navigation (1)Skip section navigation (2)
Date:      30 Apr 2002 22:53:38 +1000
From:      Andrew Reilly <areilly@bigpond.net.au>
To:        ANdrei <andrei@abc.ro>
Cc:        fs@freebsd.org, bugs@freebsd.org
Subject:   Re: xterm & directory cat
Message-ID:  <1020171218.3085.26.camel@gurney.reilly.home>
In-Reply-To: <3CCE8982.6A915F2B@abc.ro>
References:  <3CCE8982.6A915F2B@abc.ro>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1020171218.3085.26.camel>