これは期待通りに動作します
$ echo "foo" > foo
$ cat foo                # foo
$ echo "updated" > foo
$ cat foo                # updated
 から man set
-C      If  set, bash does not overwrite an existing file with the
        >, >&, and <> redirection operators.  This may be overridden
        when creating output files by using the redirection operator
        >| instead of >.
 わかりました、それではましょう set -C
$ set -C
$ echo "bar" > bar
$ cat bar                # bar
$ echo "updated" > bar
file exists: bar
 これで問題ありませんが、今はオフにします。 set -C。 
 無効にする方法 set -C それがオンになった後? 
私はもう試した:
$ unset -C
zsh: bad option: -C