1833030 Members
2521 Online
110049 Solutions
New Discussion

RSYNC - EXCLUDE

 
Andreas Plumanns
New Member

RSYNC - EXCLUDE

Hello, i would like to rsync a directory without a special dir. example: /usr/sap/trans/sik . everythink must by rsync but without the directory sik . I use hpux 11.23
2 REPLIES 2
Patrick Wallek
Honored Contributor

Re: RSYNC - EXCLUDE

Have a look at the rsync man page and read about the '--exclude' option. You should be able to use that to do what you need.
Mancboy
Valued Contributor

Re: RSYNC - EXCLUDE

if I have src1/src2/src4 under /tmp/src1 and I don't this to be rsynced, then exclude src1/src2/src4 from the process:

rsync -avz --exclude=src1/src2/src4 /tmp/src1 /tmp/dest1/

or have an exclusions file and put your list of exlusions in there, then have --exclude-from="name of your exclusions file"