I'm a careless terminal driver scared of accidentally deleting files, hence using some aliases like
alias rm='rm -i' for
cp. How can I get a similar confirmation behavior for file redirections (e.g
echo "I'm silly" > very_important_file.txt).
The common case is that I usually use replace (
>) instead of append (
>>) and so I ended up accidentally deleting some mid-important files. What are your suggestions?