Clobbering
Redirecting standard output to a file that already exists would overwrite the existing file content which will result in data loss. This process of over-writing existing data is called clobbering. In order to prevent overwriting, the shell provides an option called “noclobber”
How to protect Linux shell file using noclobber in bash shell?
Most Linux shells(bash, csh, ksh, tcsh) have a built-in file protection mechanism to prevent files from being overwritten accidentally. In this article, we will see how to prevent it by setting noclobber option.