How can I remove this file ?

Erik Trulsson ertr1013 at student.uu.se
Fri Apr 9 04:50:37 PDT 2004


On Fri, Apr 09, 2004 at 12:40:35PM +0100, Supote Leelasupphakorn wrote:
> Hi lists
> 
>   How can I delete file named prefix with "-" ?

If you had bothered to read the manpage for rm(1) you would already
know that since the following paragraph appears there:

   The rm command uses getopt(3) to parse its arguments, which allows it to
   accept the --' option which will cause it to stop processing flag
   options at that point.  This will allow the removal of file names that
   begin with a dash (-').  For example:
         rm -- -filename
   The same behavior can be obtained by using an absolute or relative path
   reference.  For example:
         rm /home/user/-filename
         rm ./-filename



-- 
<Insert your favourite quote here.>
Erik Trulsson
ertr1013 at student.uu.se


More information about the freebsd-questions mailing list