using rm to remove a file that starts with a dash

Andrew Brink abrink at ns.brink.cx
Sat Oct 27 18:52:00 CDT 2001


rm -- -file and/or rm ./-file should have worked

On Sat, Oct 27, 2001 at 12:47:36PM -0500, Ray Hanes wrote:
> 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