Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!


TUCoPS :: PC Hacks :: direct_1.txt

Changing to directories with weird characters in them




16. How to I change to directories with strange characters in them?

These directories are often used by people trying to hide information, most
often warez (commercial software).
There are several things you can do to determine what these strange
characters are. One is to use the arguments to the ls command that cause ls
to give you more information:
From the man page for ls:

    -F   Causes directories to be marked with a trailing ``/'',
         executable files to be marked with a trailing ``*'', and
         symbolic links to be marked with a trailing ``@'' symbol.

    -q   Forces printing of non-graphic characters in filenames as the
         character ``?''.

    -b   Forces printing of non-graphic characters in the \ddd
         notation, in octal.

Perhaps the most useful tool is to simply do an "ls -al filename" to save
the directory of the remote ftp site as a file on your local machine. Then
you can do a "cat -t -v -e filename" to see exactly what those bizarre
little characters are.
From the man page for cat:

    -v  Causes non-printing characters (with the exception of tabs,
        newlines, and form feeds) to be displayed.  Control characters
        are displayed as ^X (x), where X is the key pressed with
        the  key (for example, m is displayed as ^M).  The
         character (octal 0177) is printed as ^?.  Non-ASCII
        characters (with the high bit set) are printed as M -x, where
        x is the character specified by the seven low order bits.

    -t  Causes tabs to be printed as ^I and form feeds as ^L.  This
        option is ignored if the -v option is not specified.

    -e  Causes a ``$'' character to be printed at the end of each line
        (prior to the new-line).  This option is ignored if the -v
        option is not set.

If the directory name includes a or a you will need to enclose the entire
directory name in quotes. Example:

cd ".."

On an IBM-PC, you may enter these special characters by holding down the
key and entering the decimal value of the special character on your numeric
keypad. When you release the key, the special character should appear on
your screen. An ASCII chart can be very helpful.
Sometimes people will create directories with some of the standard stty
control characters in them, such as ^Z (suspend) or ^C (intr). To get into
those directories, you will first need to user stty to change the control
character in qustion to another character.
From the man page for stty:

    Control assignments

    control-character C
                                  Sets control-character to C, where control-character is
                                  erase, kill, intr (interrupt), quit, eof, eol, swtch
                                  (switch), start, stop or susp.

                                  start and stop are available as possible control char-
                                  acters for the control-character C assignment.

                                  If C is preceded by a caret (^) (escaped from the
                                  shell), then the value used is the corresponding con-
                                  trol character (for example, ^D is a d; ^? is
                                  interpreted as DELETE and ^- is interpreted as unde-
                                  fined).

Use the stty -a command to see your current stty settings, and to determine
which one is causing you problems.


TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2014 AOH