Clobbering a File
Clobbering the files will helps in keeping the files safe from Accidental over writing. It can be too easy to mistype a filename and find that you’ve redirected output into a file that you meant to save.
To be on safer side you can set clobber for your important files using the bellow command.
————–
$ set -o noclobber
————–
If you decide you don’t want to be so careful after all, then turn the option off:
————–
$ set +o noclobber
————–
Example:
————-
vinoth.sk@3wing18:~$ set -o noclobber
vinoth.sk@3wing18:~$ echo b >a
-bash: a: cannot overwrite existing file
vinoth.sk@3wing18:~$ set +o noclobber
vinoth.sk@3wing18:~$ echo b >a
vinoth.sk@3wing18:~$
————-
————