Author: Vladimir Petersen
Email Address: vladimip@uniserve.com
Web Page (if applicable): n/a
One-line summary of topic\question:

I made a directory with a dash in its name and can't delete it.

Original date of FAQ topic: 18th of June 1997
Date FAQ topic was last modified: 18th of June 1997

Fully qualified question (if applicable):

Accedentally, I created a file or directory with a dash or some
other unusual character in it and now I don't know how to get
rid of it.

Related Issues (if applicable): Manual page for 'rm' utility.

Answer:

Suppose you created a file or directory called "-somefile". There
are many ways to get rid of it but the simplest ones are:

rm -rf ./-somefile

or

rm -rf -- -somefile

