Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

remove a file with name -c 1

Status
Not open for further replies.

czins

Technical User
Jan 14, 2002
37
CH
Hello,

I produced accidentally a file named: /tmp/-c

I tried following commands to remove it:
rm *
rm "-c"
rm "\-c"
rm '-c'

but I was not successfull. Does somebody have an idea ?

Regards
Stefan
 
Hi,
use -- to delimit end of switches, then -c as the name
Code:
rm -- -c
 
Doh. That's probably what I meant!!

I want to be good, is that not enough?
 
Hello Ken and aau,

thanks a lot for your help, it worked perfectly.

Regards
Stefan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top