Rsync copy directory contents but not directory itself
rsync
Solution
rsync interprets a directory with no trailing slash as `copy this directory`, and a directory with a trailing slash as `copy the contents of this directory`.
Try `rsync -av ~/foo/ user@remote.com:/var/www/bar/`
Problem
I'm trying to synchronize two contents of folders with different name: ``` rsync -av ~/foo user@remote.com:/var/www/bar ``` I'd like to copy the content of `foo` into `bar` at remote host, but not the directory `foo` itself. I've tried something like `foo/*`, but rsync doesn't support that. rsync always creates ``` /var/www/bar/foo ```