rsync not coping hidden files starting with a dot

rsync not coping hidden files starting with a dot

This is due to the fact that * is by default expanded to all files in the current working directory except the files whose name starts with a dot. Thus, rsync never receives these files as arguments.

You can pass . denoting current working directory to rsync:

rsync -av . server2::sharename/B
This way rsync will look for files to transfer in the current working directory as opposed to looking for them in what * expands to.

Alternatively, you can use the following command to make * expand to all files including those which start with a dot:

shopt -s dotglob

Leave a Reply

Your email address will not be published. Required fields are marked *

7 − 2 =