0

TL;DR:

A (kinda bad) python setup asked me for a path. I started typing,backspace, backspace, typed something other. Okay this setup created a folder with the following name (according to ls):

?[3~?[4~foo

Obviously the name contains some control characters. The parent directory contains some other very important folders that I can't move to execute a rm -rf *

Okay, so:

How to delete the folder?

I should mention I only have SSH access - there is no GUI.

mv "?[3~?[4~foo" x won't work obviously since these are control characters.

bablewa
  • 173
  • 4
  • 11
  • `ls -b` will show you the file name with the escape characters expanded. If `ls "?[3~?[4~foo"` shows only one file, then you can safely use `rm -rfi "?[3~?[4~foo"`. If it looks like it's OK try again without the `-i`. – AFH Sep 26 '14 at 20:34

1 Answers1

0

You can try wildcard matching - are there any important files in ls *foo? Also, you can try ls *foo | xxd to get the hex codes of the control characters.

choroba
  • 18,638
  • 4
  • 48
  • 52