Javatpoint Logo
Javatpoint Logo

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:

Linux file cp backup

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




Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


B.Tech / MCA