Saturday, October 28, 2006

How to remove a file with a dash as first character?

If you accidentally created a file with a - in the beginning then you want to
remove it, you have to do :
rm ./-thefile

10 comments:

Igor said...

Thank you. Exactly what I was looking for!

JTP said...

Thank you! No amount of backslashing seems to work.

Anonymous said...

Thanks - exactly what I needed!

Unknown said...

thank you , I was looking for it.

Tim said...

Absolute magic

Anonymous said...

Thank you!!!

Anonymous said...

And if you have a file like this: "--exclude", you can delete it like this:
rm ./--exclude

Anonymous said...

Th-thanks

James said...

Awesome, you saved my life...

ok said...

Thanks!

Optimizing the operating system (OS) for MySQL server

 Optimizing the operating system (OS) for MySQL server Optimizing the operating system (OS) for a MySQL server involves configuring various ...