Arthor
Arthor

Reputation: 674

Unable to delete folder in linux with special character

I have a folder which is:

/var/www/xxx/html/'.

It was created accidentally. I try to delete it but it comes up,

No such files or directory

I have tired

rm -f /var/www/xxx/html/'.

rm -f "/var/www/xxx/html/'."

rm -f /var/www/xxx/html/*'*.

It is because of the '.

I have been looking around for a few hours but no joy.

Upvotes: 0

Views: 111

Answers (2)

bornbygoogle
bornbygoogle

Reputation: 1

Try this :

rmdir /var/www/xxx/html/\'

Upvotes: 0

leu
leu

Reputation: 2081

cd /var/www/xxx/html
rm -rf \'.

worked for me.

Upvotes: 1

Related Questions