小ネタ
rmのあとに -- を書いてからファイル名を書くとオプションとして認識されないのでそれを利用するか、./のようにパスを明示するとよい。
$ rm -v -- - removed '-' $ rm -v ./- removed './-'
毎回 rm -i * とかしていたので助かる…。
というか、rm --helpでこの方法が書かれているんですね。。
$ rm --help Usage: rm [OPTION]... [FILE]... Remove (unlink) the FILE(s). -- snip -- To remove a file whose name starts with a '-', for example '-foo', use one of these commands: rm -- -foo rm ./-foo -- snip --