rsync command exclude option
Paul Slootman
paul+rsync at wurtel.net
Wed Nov 26 11:27:06 GMT 2008
On Wed 26 Nov 2008, Kaushal Shriyan wrote:
>
> I do rsync -avz oldUnicelFiles hostB:/home/kaushal
> --exclude-from=exclude.txt
> but it rsynced the excluded files too
>
> my exclude.txt file contains
> ####################
> /home/kaushal/oldUnicelFiles/*.gz
> /home/kaushal/oldUnicelFiles/*.txt
> ####################
The excludes must be relative to the source;
the following exclude.txt should work:
/oldUnicelFiles/*.gz
/oldUnicelFiles/*.txt
You could leave out the directory if you want to exclude ALL *.gz and
*.txt files:
*.gz
*.txt
Paul
More information about the rsync
mailing list