Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

How can I read, write, or delete a file which has a name beginning with a pair of hyphens?

In my /etc/apt/sources.list.d/ there is a set of files whose name starts with --karmic.list .

When I try to rm or vim from the command line, it considers it as argument and reports as unknown arg.

How can I deal with this? How is it possible to select a file with this kind of name?

share|improve this question

marked as duplicate by minerz029, Lucio, Eric Carvalho, Seth, Braiam Feb 12 at 1:11

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

up vote 8 down vote accepted

Use the full path /etc/apt/sources.list.d/--whatever or in the directory ./--whatever, or use rm -- --whatever.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.