Unfortunately Nautilus doesn't have that option.
Option 1: A different file manager
You could try another file manager like Dolphin.
(requires the Universe repository)
Option 2: Command-line
You can also use the command line program cp(1)
with the backup option:
cp --backup -t DESTINATION SOURCE [SOURCE...]
This has the following effects which can be controlled with other options as described in the manual page of cp(1)
:
--backup[=CONTROL]
― make a backup of each existing destination file
-b
― like --backup
but does not accept an argument
-S
, --suffix=SUFFIX
― override the usual backup suffix
The backup suffix is ~
, unless set with --suffix
or SIMPLE_BACKUP_SUFFIX
. The version control method may be selected via the --backup
option or through the VERSION_CONTROL
environment variable. Here are the values:
none
, off
: never make backups (even if --backup
is given)
numbered
, t
: make numbered backups
existing
, nil
: numbered if numbered backups exist, simple otherwise
simple
, never
: always make simple backups
Example
cp --backup=existing --suffix=.orig -t ~/Videos ~/Music/*
This will copy all files in ~/Music
to ~/Videos
. If a file of the same name exists at the destination, it is renamed by appending .orig
to its name as a backup. If a file with the same name as the backup exists, the backup is instead renamed by appending .1
and if that exists as well .2
and so forth. Only then is the source file copied to the destination.
If you want to copy files in subdirectories recursively use:
cp -R --backup=existing --suffix=.orig -t ~/Videos ~/Music
Will try out Dolphin.
– heisenbergman Oct 19 '14 at 11:12file.json
, then I get afile.json.json
(using the--suffix=json
) and then I get get an error saying it cannot overwrite an existing file. Using Ubuntu 18, piping results fromfind
like this:find ./ -name 'meta.json' | xargs cp --backup=existing --suffix=.json -t ~/data/
. I get 3 files as described above, then the error:cp: will not overwrite just-created '/home/user/data/meta.json' with './path/to/meta.json'
. I also tried-I {}
placeholders withxargs
. – n1k31t4 Apr 20 '20 at 11:18--backup=existing
again. Hint: What happens in the following case:touch foo bar; cp -v --backup=numbered foo bar; cp -v --backup=existing foo bar
? – David Foerster Apr 21 '20 at 11:59