CARTER-HITCHIN, David, FM
2005-Oct-19 14:42 UTC
Help needed with filtering rules - how to copy named director ies only
Hi Wayne, What would be really nice, and I imagine quite easy from a coding perspective would be to allow the user to apply a regex match on the full pathname of the files being transferred. Anyway, thanks for your confirmation - I have worked around this problem. Cheers, David Carter-Hitchin. -- Royal Bank of Scotland Interest Rate Derivatives IT 135 Bishopsgate LONDON EC2M 3TP Tel: +44 (0) 207 085 1088 -----Original Message----- From: Wayne Davison [mailto:wayned@samba.org] Sent: 18 October 2005 21:02 To: CARTER-HITCHIN, David, FM Cc: 'rsync@lists.samba.org' Subject: Re: Help needed with filtering rules - how to copy named directories only On Tue, Oct 18, 2005 at 01:03:17PM +0100, CARTER-HITCHIN, David, FM wrote:> The only way I can think around this is to run on the source server > "find /apps/IRDtools/pkgs -name lib -type d" and pipe the output of > that into an rsync "--files-from=-".Yes, that's the only solution that avoids creating a lot of empty dirs at the moment. The closest you can get with include/exclude rules is something like this: + */ + lib/* - * That would copy the immediate contents of all "lib" dirs, and also the entire hierarchy of directories. If you want all the contents from the subdirs under "lib", you would need to change "lib/*" to "lib/**". ..wayne.. *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbs.co.uk/CBFM http://www.rbsmarkets.com ********************************************************************************
Wayne Davison
2005-Oct-19 22:11 UTC
Help needed with filtering rules - how to copy named director ies only
On Wed, Oct 19, 2005 at 03:41:16PM +0100, CARTER-HITCHIN, David, FM wrote:> What would be really nice, and I imagine quite easy from a coding > perspective would be to allow the user to apply a regex match on the > full pathname of the files being transferred.It's already possible to match on the full pathname (using wildmat syntax, not regular expressions), but that doesn't help to avoid any superfluous directory creation. ..wayne..