How can I remove this file ?

Troy Settle troy at psknet.com
Fri Apr 9 07:40:30 PDT 2004


> -----Original Message-----
> From: David Piniella
> Sent: Friday, April 09, 2004 10:02 AM
> 
> 
> I've never run across that.
> 
> % cd tmp
> % ls
> % touch -
> % ls
> -
> % rm -
> % ls
> %
> 
> although if it was giving you trouble, I suppose you could do a
> rm ./\-
> 
> -- 
> David Piniella
> University of Miami
> 

David, I think you missed the part where the hypen was the first character
of the filename, not the only character.

$ touch -file
touch: illegal option -- i
usage: touch [-acfm] [-r file] [-t [[CC]YY]MMDDhhmm[.SS]] file ...

$ touch -- -file

$ rm -file
rm: illegal option -- l
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file

$ rm -- -file

--
  Troy Settle
  Pulaski Networks
  http://www.psknet.com
  866.477.5638



More information about the freebsd-questions mailing list