Rsync + not copy empty dir

rsync

"rsync" doesn't seem to synchronize create empty directories on the target_dir
( I have empty dir under "from_dir" directory ) , so why rsync not copy the the empty dir from "from_dir" to "target_dir" ?

rsync -WavH –progress /from_dir 176.23.4.1:/target_dir

Best Answer

Works for me:

$ rsync --version | head -n 1
rsync  version 3.0.7  protocol version 30
$ mkdir src
$ mkdir dest
$ mkdir src/emptydir
$ mkdir src/fulldir
$ touch src/fulldir/file
$ rsync -WavH -progress src/ dest/
$ ls -lR dest
dest:
emptydir/  fulldir/

dest/emptydir:

dest/fulldir:
a

Please provide a demonstration of the erroneous behaviour you're seeing, in a similar form to this.