Is there some technique that's sort of the opposite of rsync's
"--existing" option? I want to copy from one linux installation to
another *only* the files from the first that are nonexistent on the
second
If a file /aaa/bbb/ccc exists on both, then I don't want the one on
the destination to get overwritten by the one on the source,
regardless of their sizes or timestamps. Existence under the identical
name should be enough to immunize the destination file from getting
clobbered by its namesake from the source.
My objective is to capture and transfer only those files (by filename)
that the source has and the destination does not. The destination is a
virgin installation of Fedora 4. The source is a tired old
installation of RedHat8 on which over years I've created a lot of
personal stuff (thousands of files). I want to transfer as much of
that stuff to the new system by automatic means as I can. While making
sure the Fedora fileset doesn't get contaminated by files of the same
name from the old system (eg, they both contain a file called
/etc/passwd and I don't want the new one molested just because there's
another bearing the same name on the old system).
These are both single-partition linux installations, on separate hard
disks. The drives are currently in two networked computers but could
be nfs-mounted or physically placed in a single computer to enable
local commands like cp or find/exec if they help. I've been looking at
rsync so far but don't see my solution-- "update" comes close. It says
"don't overwrite newer files" of the same name. But I want "don't
overwrite any..." How to accomplish this?
|