What does Linux cp -n or –no-clobber option do?

Linux cp command by default overwrites the destination file/directory with source file/directory and if the destination file/directory does not exist then it simply copies the source file/directory to the destination file/directory.

Using cp -n or –no-clobber option, you can disable overwriting of destination file/directory if already exists.

Leave a Reply