What does Linux cp -i or –interactive 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 -i or –interactive option, you can prompt before overwriting if the destination file/directory already exists.

Leave a Reply