All,
Could someone please help me resolve this:
[admx:test] $ ls
ERR01 ah01 ah02 an01 an02 mp01 mp02
[admx:test] $ ls {an,mp,ERR}*
ERR01 an01 an02 mp01 mp02
I want to rsync only the "{an,mp,ERR}*" files across using the
following
command but do not see the expected results.
[admx:test] $ rsync -va --exclude="*"
--include="{an,mp,ERR}*" ./*
mm2x::AppError
building file list ... done
wrote 67 bytes read 337 bytes 269.33 bytes/sec
total size is 0 speedup is 0.00
I am running 'rsync version 2.3.1 protocol version 20' on a IBM
RS6000/F50 running AIX 4.3.1 on both sides.
Thanks
Nishi
rsync doesn't do the odd wildcard syntax you show there... you'll have
to
do --include=an* --include=mp* --include=ERR*
Tim Conway
tim.conway@philips.com
303.682.4917
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn,
19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970),
".\n" '
"There are some who call me.... Tim?"
"Kapoor, Nishikant X" <Nishikant.X.Kapoor@xcelenergy.com>
Sent by: rsync-admin@lists.samba.org
11/30/2001 09:09 AM
To: rsync@lists.samba.org
cc: (bcc: Tim Conway/LMT/SC/PHILIPS)
Subject: include/exclude ?
Classification:
All,
Could someone please help me resolve this:
[admx:test] $ ls
ERR01 ah01 ah02 an01 an02 mp01 mp02
[admx:test] $ ls {an,mp,ERR}*
ERR01 an01 an02 mp01 mp02
I want to rsync only the "{an,mp,ERR}*" files across using the
following
command but do not see the expected results.
[admx:test] $ rsync -va --exclude="*"
--include="{an,mp,ERR}*" ./*
mm2x::AppError
building file list ... done
wrote 67 bytes read 337 bytes 269.33 bytes/sec
total size is 0 speedup is 0.00
I am running 'rsync version 2.3.1 protocol version 20' on a IBM
RS6000/F50 running AIX 4.3.1 on both sides.
Thanks
Nishi
It is finally working but I am not sure if I understand it right. It seems to me that the order in which 'include' and 'exclude' exist in the command line is making all the difference. Check out the following two commands: *** include is BEFORE exclude - Working fine ! *** [admx:test] $ rsync -va --include=an* --exclude=* ./* mm2x::AppError building file list ... done an01 an02 wrote 178 bytes read 369 bytes 1094.00 bytes/sec total size is 0 speedup is 0.00 *** include is AFTER exclude - Not Working ! *** [admx:test] $ rsync -va --exclude=* --include=an* ./* mm2x::AppError building file list ... done wrote 67 bytes read 337 bytes 269.33 bytes/sec total size is 0 speedup is 0.00 Unless I am missing something obvious, the order is all that is different in two statements above. Nishi> -----Original Message----- > From: tim.conway@philips.com [SMTP:tim.conway@philips.com] > > rsync doesn't do the odd wildcard syntax you show there... you'll have > to > do --include=an* --include=mp* --include=ERR* > > Tim Conway > tim.conway@philips.com > 303.682.4917 > Philips Semiconductor - Longmont TC > 1880 Industrial Circle, Suite D > Longmont, CO 80501 > Available via SameTime Connect within Philips, n9hmg on AIM > perl -e 'print pack(nnnnnnnnnnnn, > 19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970) > , > ".\n" ' > "There are some who call me.... Tim?" > > > "Kapoor, Nishikant X" <Nishikant.X.Kapoor@xcelenergy.com> > > All, > > Could someone please help me resolve this: > > [admx:test] $ ls > ERR01 ah01 ah02 an01 an02 mp01 mp02 > > [admx:test] $ ls {an,mp,ERR}* > ERR01 an01 an02 mp01 mp02 > > I want to rsync only the "{an,mp,ERR}*" files across using the > following > command but do not see the expected results. > > [admx:test] $ rsync -va --exclude="*" --include="{an,mp,ERR}*" ./* > mm2x::AppError > building file list ... done > wrote 67 bytes read 337 bytes 269.33 bytes/sec > total size is 0 speedup is 0.00 > > I am running 'rsync version 2.3.1 protocol version 20' on a IBM > RS6000/F50 running AIX 4.3.1 on both sides. > > Thanks > Nishi >
You're right. the order dependency actually lets you create very complex
include/exclude rules. for each item, each --include and --exclude is
evaluated in commandline order, until the item has either passed all the
tests, and is thus included, or has been excluded, at which point
evaluation restarts with the next item. if you --exclude=* first, every
file gets excluded right away, and never gets checked to see if it matches
--include=an* .
Group: That's a correct synopsis of the behaviour, isn't it? If not,
don't let my error stand.
Tim Conway
tim.conway@philips.com
303.682.4917
Philips Semiconductor - Longmont TC
1880 Industrial Circle, Suite D
Longmont, CO 80501
Available via SameTime Connect within Philips, n9hmg on AIM
perl -e 'print pack(nnnnnnnnnnnn,
19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970),
".\n" '
"There are some who call me.... Tim?"
"Kapoor, Nishikant X" <Nishikant.X.Kapoor@xcelenergy.com>
11/30/2001 01:40 PM
To: Tim Conway/LMT/SC/PHILIPS@AMEC
"Kapoor, Nishikant X" <Nishikant.X.Kapoor@xcelenergy.com>
cc: rsync@lists.samba.org
rsync-admin@lists.samba.org
Subject: RE: include/exclude ?
Classification:
It is finally working but I am not sure if I understand it right. It
seems to me that the order in which 'include' and 'exclude'
exist in the
command line is making all the difference. Check out the following two
commands:
*** include is BEFORE exclude - Working fine ! ***
[admx:test] $ rsync -va --include=an* --exclude=* ./* mm2x::AppError
building file list ... done
an01
an02
wrote 178 bytes read 369 bytes 1094.00 bytes/sec
total size is 0 speedup is 0.00
*** include is AFTER exclude - Not Working ! ***
[admx:test] $ rsync -va --exclude=* --include=an* ./* mm2x::AppError
building file list ... done
wrote 67 bytes read 337 bytes 269.33 bytes/sec
total size is 0 speedup is 0.00
Unless I am missing something obvious, the order is all that is
different in two statements above.
Nishi
> -----Original Message-----
> From: tim.conway@philips.com [SMTP:tim.conway@philips.com]
>
> rsync doesn't do the odd wildcard syntax you show there... you'll
have
> to
> do --include=an* --include=mp* --include=ERR*
>
> Tim Conway
> tim.conway@philips.com
> 303.682.4917
> Philips Semiconductor - Longmont TC
> 1880 Industrial Circle, Suite D
> Longmont, CO 80501
> Available via SameTime Connect within Philips, n9hmg on AIM
> perl -e 'print pack(nnnnnnnnnnnn,
> 19061,29556,8289,28271,29800,25970,8304,25970,27680,26721,25451,25970)
> ,
> ".\n" '
> "There are some who call me.... Tim?"
>
>
> "Kapoor, Nishikant X" <Nishikant.X.Kapoor@xcelenergy.com>
>
> All,
>
> Could someone please help me resolve this:
>
> [admx:test] $ ls
> ERR01 ah01 ah02 an01 an02 mp01 mp02
>
> [admx:test] $ ls {an,mp,ERR}*
> ERR01 an01 an02 mp01 mp02
>
> I want to rsync only the "{an,mp,ERR}*" files across using the
> following
> command but do not see the expected results.
>
> [admx:test] $ rsync -va --exclude="*"
--include="{an,mp,ERR}*" ./*
> mm2x::AppError
> building file list ... done
> wrote 67 bytes read 337 bytes 269.33 bytes/sec
> total size is 0 speedup is 0.00
>
> I am running 'rsync version 2.3.1 protocol version 20' on a IBM
> RS6000/F50 running AIX 4.3.1 on both sides.
>
> Thanks
> Nishi
>