Subject: Re: raw filename w/ ls
To: None <tooleym@douglas.bc.ca>
From: Brian C. Grayson <bgrayson@ece.utexas.edu>
List: netbsd-help
Date: 01/28/1998 21:42:39
tooleym@douglas.bc.ca wrote:
> 
> Also, there wasa cute trick, using special characters for filenames that I
> encountered a while back where the name was a vt100 escape sequence that
> would erase the line (or the above two lines, or whatever) to hide a
> specific directory. However, for some reason my ls shows "?" instead of
> the escape special character so I get garbled filenames!

  I'm pretty sure this is a security feature.  Can't some
escape codes cause severe terminal garbling if they are used
improperly?  A simple one switches the character set to the
graphics characters, and if you aren't using an xterm it can be
tricky to switch it back, especially when you can't tell what
you are typing and don't have the appropriate vt100 escape
codes memorized.

  From a quick UTSL, the '?' behavior is controlled by a
variable f_nonprint that is initialized to 1 for ``substitute ?
for unprintables'' and there is no option to clear this flag. 
So, without modifying your /bin/ls source code, there's no way
to disable this feature.

  Plus, it'd be pretty hard to construct a filename that
blanked out another entry in both ``ls -l'' and ``ls -1''
(that's the ``long'' and ``single-column'' options) and all the
other possible output formats!

  Brian
-- 
Brian Grayson (bgrayson@ece.utexas.edu)
Graduate Student, Electrical and Computer Engineering
The University of Texas at Austin
Office:  ENS 406       (512) 471-8011
Finger bgrayson@orac.ece.utexas.edu for PGP key.