Protecting File Content During I/O Redirection with noclobber in Bash shell
How to use noclobber during redirection to avoid overwriting files Redirecting standard output to an existing file overwrites the previous file content, which results in data loss.