Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Control Chars in Filename

Re: Control Chars in Filename

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: 31 Oct 2002 09:04:46 -0800
Message-ID: <2687bb95.0210310904.b86f0b3@posting.google.com>


Billy Verreynne <vslabs_at_onwe.co.za> wrote in message news:<apqkm2$2dl$1_at_ctb-nnrp2.saix.net>...
> Ran into a very interesting problem yesterday. Had to do an offline drop of
> a datafile. Only, when this datafile was created, there must have been
> finger trouble via the telnet session that was used to do the add datafile.
>
> V$DATAFILE showed the filename. Used that name. Oracle said the datafilename
> is unknown. Alert log showed the filename as having a control character,
> e.g. ..../^[[2~filename.dbf (showed up as .../filename.dbf in the V$
> table).
>
> How do you drop the datafile?
>
> After some minutes of fruitless attempts, asked a Unix guy and he showed
> how. Thought that this is the type of info one needs to file under 'never
> forget'.
>
> Create a sh script in vi and do the drop file statement there. Type the
> filename as it appears and use vi to create the contol chars. Press CTRL-V
> in vi. Keep CTRL down and enter the control char, e.g. CTRL-V [ for the ^[[
> bit.

You should be able to remove the file from the UNIX command line by placing the filename in a set of double quotes. If the special character is a UNIX meta character and if rm recognizes meta characters like grep does then escaping it should allow you to do the trick. I have used this with filenames that developers managed to create that had a $ and/or * in them.

Received on Thu Oct 31 2002 - 11:04:46 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US