using rm to remove a file that starts with a dash

Ray Hanes high_tech_hanes at yahoo.com
Sat Oct 27 17:43:59 CDT 2001


Heres one I ran accross I ended up just deleating the file with a grapical interface but here is 
what I had.

I had a file that was like -file.

Using the rm command kept telling me invalid switch. Here are the variations I tried

rm '-file'
rm "-file"
rm ./*file

None of these worked. I suppose I could have tried mv and renaming it to see if that would work. 
Not a major problem here as I got it taken care of using graphical. I know I took the wimps way out 
here.





More information about the Kclug mailing list