Disable output redirection
How to disable output redirection
In output redirection, >
means redirect and overwrite existing file content. To prevent accidentally overwriting important content, you can use the following command:
set -C
This will prompt when redirecting output to an existing file:
cannot overwrite existing file
If you need to force overwrite, you can use the >|
symbol:
>|
To disable this feature, use:
set +C