removing a file with hyphens

Abigail abigail at abigail.be
Thu Jun 7 17:47:03 BST 2007


On Thu, Jun 07, 2007 at 09:29:49AM -0700, Simon Burr wrote:
> On Thu, Jun 07, 2007 at 04:04:24PM +0100, Stig Brautaset wrote:
> >Putting an empty file called '-i' in directories you care about might  
> >not be a bad idea.
> 
> That could potentially some interesting side effects for any other commands
> which you use * on whilst in that directory!
> 
> It also doesn't protect against people doing an rm -rf in the parent of the
> directory you're trying to protect.

Nor against people doing

    rm * -rf

And '-i' can be counteracted by a file called '--'.



Abigail


More information about the london.pm mailing list