I'm using rsync to copy a directory from a local host to remote host
with the following command:

rsync -av --exclude=“/home/httpd/html/stat”  /home/httpd/html
remotehost:/home/httpd

I would like to exclude from the copy the direcotory
"/home/httpd/html/stat" but I have not been able to exclude it.
I have tried all the following commands, but the rsync continue to copy
the directory as well:
rsync -av --exclude "/home/httpd/html/stat"  /home/httpd/html
remotehost:/home/html
rsync -av --exclude="/home/httpd/html/stat/*"  /home/httpd/html
remotehost:/home/html
rsync -av --exclude "/home/httpd/html/stat/*"  /home/httpd/html
remotehost:/home/html
rsync -av --exclude-from=/exclude  /home/httpd/html
remotehost:/home/html

where /exclude is a file containing the following line:
/home/httpd/html/stat

Could someone tell me the right command to exclude the directory “stat”
from the copy?

Thanks

Donatella Rossetti






Reply via email to