[CentOS] How to delete files with specical characters in the name?

Tue Jan 22 16:51:28 UTC 2008
Matt Hyclak <hyclak at math.ohiou.edu>

On Tue, Jan 22, 2008 at 11:46:57AM -0500, Eric B. enlightened us:
> I've got an odd situation here.  Somehow, I find myself with two files that 
> start with the - character.
> [eric at apollo mysql]$ ls -l
> total 93348
> -rw-r--r--  1 mysql mysql  9273344 Nov 13 19:03 -N=2007-11-08
> -rw-r--r--  1 mysql mysql 38879232 Nov 13 19:02 --newer=2007-11-08
> 
> 
> Don't ask how they were created; something went wrong with a script at some 
> point.
> 
> My problem is that I am trying to delete them, but can't figure out how to 
> delete these files.  Everything I try, I get the same msg:
> [eric at apollo mysql]$ rm '-N=2007-11-08'
> rm: invalid option -- N
> Try `rm --help' for more information.
> 
> 
> I have tried single quotes, double quotes, escaping it with a \ and still 
> get the same error.
> 
> Any ideas / suggestions?
> 

rm -- -N=2007-11-08

The -- tells (most?) programs to stop processing options. This is listed as
an example in the rm man page, so you should know that, right? I mean, you
*did* read the man page....

Matt

-- 
Matt Hyclak
Department of Mathematics 
Department of Social Work
Ohio University
(740) 593-1263