102
Linux cp –backup
If the file you want to copy already exists in the destination directory, you can backup your existing file with the use of this command.
Syntax:
Example:
As you can see above, ‘file2.txt’ already exists in the destination directory. Hence, we have created a backup of this file and copied it in the same directory (having same name).
Now our destination directory that is ‘Downloads’ has two files with the same name (that is ‘file2.txt’).
Next TopicLinux cp -i