I have a file called ^?x
(thats ^?
the backspace character). I have no idea how it got that way, but I need to get rid of it. Except when I try to do rm
I don't really know what to type. How can I delete the file?
Asked
Active
Viewed 63 times
0

David says Reinstate Monica
- 19,209
- 22
- 79
- 122
-
because your question is off-topic. It should be on superuser or one of the linux/unix sites. – Carl Norum Jul 25 '14 at 18:45
-
Unix issues overlap SO, SU and unix. All are good. – David says Reinstate Monica Jul 25 '14 at 18:51
-
Often times, your terminal emulator will emit the control character after hitting `[C-v]`. – jxh Jul 25 '14 at 19:01
1 Answers
3
Do you have other files that end in x
? If not, just rm *x
will do it. If you do need to type it directly, you can use \010
which is the octal sequence for the backspace character.

Carl Norum
- 219,201
- 40
- 422
- 469
-
1In this case, I'd recommend `rm -i *x`, or since it's one character `rm -r ?x` – glenn jackman Jul 25 '14 at 18:33
-
`^?` is the DEL character, not backspace. Backspace is represented as `^H`. But octal sequences aren't automatically translated in shell commands; if I type `rm \010` my shell just ignores the backslash. In bash you can use `rm $'\010'` -- or, in this case, `rm $'\177x` – Keith Thompson Jul 25 '14 at 19:10
-