removing a file with hyphens

Stig Brautaset stig at brautaset.org
Thu Jun 7 16:04:24 BST 2007


On 7 Jun 2007, at 7 Jun 15:40, Matt Wilson wrote:
> If you really need to get that file I'd recommend:
>
> $ rm -rf *
>
> It's the only surefire way.

Except it doesn't work :)

  % mkdir /tmp/foo
  % cd /tmp/foo
  % touch -- foo bar baz --nonexistantoption
  % rm -rf *
rm: unrecognised option `--nonexistantoption'
Try `rm --help' for more information.

Putting an empty file called '-i' in directories you care about might  
not be a bad idea.

Stig

-- 
http://blog.brautaset.org
http://code.brautaset.org





More information about the london.pm mailing list