Delete a folder called "ky-right"> <"

2

I've made a crawler in PHP that crawls a certain website. It's kind of a proxy/crawler.

So it can get pretty messy some times and it ended up creating a folder called:

ky-right">                          <

And since it contains so many weird characters, it's hard to remove.

I've tried to cd, write ky and tab, but it doesn't auto enter the rest of the folder. Else than that, I've tried these commands, but they seem to only work on files, rather than folders:

sudo rm -- ky-right\"\>\ \ \ \<
sudo rm -- 'ky-right">????? ????<'
sudo rm -i -- ky-ri

The folder is located in /media/storagedrive/database/, and under that folder, lies over 300'000 files. So I'm really afraid of deleting it all.

Is it some kind of command that can delete and find folder that includes "ky-right" or something?

Typewar

Posted 2017-04-21T13:38:45.047

Reputation: 143

Answers

2

Try this :

rmdir ./ky

then type tab until it selects the whole directory name. Or type this if you know what you're doing :

rm -rf ./ky*

jehutyy

Posted 2017-04-21T13:38:45.047

Reputation: 194

Thanks a lot. First I forgot to sudo first, and it outputted a whole lot more of what I saw. The folder had 771 characters. – Typewar – 2017-04-21T13:48:44.523