You are not logged in.

#1 2018-08-13 20:25:23

N_BaH
Member
Registered: 2015-12-30
Posts: 84

[solved] rsync --ignore-existing ignored

hi,

I'm facing strange behaviour of rsync :

$ mkdir -p /tmp/dir1/dir1_{1..3}; mkdir -p /tmp/dir2/dir1_{2..3}
$ ls /tmp/dir*
/tmp/dir1:
dir1_1/  dir1_2/  dir1_3/
 
/tmp/dir2:
dir1_2/  dir1_3/
$ rsync -nav --ignore-existing /tmp/dir1/ /tmp/dir2
sending incremental file list
./
dir1_1/
dir1_2/
dir1_3/
 
sent 131 bytes  received 31 bytes  324.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)

am I doing anything wrong ?

Last edited by N_BaH (2018-08-13 23:12:29)

Offline

#2 2018-08-13 21:58:52

seth
Member
Registered: 2012-09-03
Posts: 51,317

Re: [solved] rsync --ignore-existing ignored

man rsync

--ignore-existing
              This  tells  rsync to skip updating files that already exist on the destination (this does not ignore existing
              directories, or nothing would get done).

Offline

#3 2018-08-13 22:23:15

N_BaH
Member
Registered: 2015-12-30
Posts: 84

Re: [solved] rsync --ignore-existing ignored

"little things that make you go grr" : not really read the man page. sad
thank you.

indeed

$ mkdir /tmp/dir{1,2}
$ touch /tmp/dir{1,2}/file{1..3}
$ rsync -nav --ignore-existing /tmp/dir1/ /tmp/dir2
sending incremental file list
./
file1

sent 104 bytes  received 22 bytes  252.00 bytes/sec
total size is 0  speedup is 0.00 (DRY RUN)

thanks again.

Offline

Board footer

Powered by FluxBB