It's because the caret is often used to signify the ctrl key having been pressed, or that it's otherwise a control character.
The key sequence that you actually typed was this:
cp filename.xsl .ctrl+Vbackspace~Enter
You were presumably trying to copy the file to your home directory (
~). You can repeat this by typing ctrl+Vbackspace. You'll see
^? printed on the screen.
You can view files with non-printing characters converted to C-style escapes like this (it's the
-b flag that's important, but since your file begins with a dot you'll need
-a as well:
$ ls -ab
. .. .\177~
-b you only see it as
.?~ not because it's simply omitting the
^, but because any non-pritable character is displayed as
touchctrl+VEnterfooEnter and then
ls. The file you'll see will be
ls -b will show
So when you
rm .?~ it is matching because in this case the
? you typed is interpreted by the shell as a globbing wildcard to match any single character, not specifically an actual question mark. You have
rm aliased to
rm -i so it's confirming your action and when it does it shows the C-style escape code.