From owner-freebsd-questions@FreeBSD.ORG Sat Oct 28 06:19:41 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F34416A403 for ; Sat, 28 Oct 2006 06:19:41 +0000 (UTC) (envelope-from malcolm.kay@internode.on.net) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEDBC43D46 for ; Sat, 28 Oct 2006 06:19:40 +0000 (GMT) (envelope-from malcolm.kay@internode.on.net) Received: from ppp66-14.lns3.adl2.internode.on.net (HELO alpha.home) ([121.44.66.14]) by ipmail01.adl2.internode.on.net with ESMTP; 28 Oct 2006 15:49:38 +0930 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah4FAB2SQkV5LEIO/2dsb2JhbACBTA X-IronPort-AV: i="4.09,367,1157293800"; d="scan'208"; a="37039358:sNHT22093001" From: Malcolm Kay Organization: at home To: freebsd-questions@freebsd.org Date: Sat, 28 Oct 2006 15:49:37 +0930 User-Agent: KMail/1.8 References: <20061027174512.GA88552@thought.org> <4542BBE7.6050708@adventuras.no> In-Reply-To: <4542BBE7.6050708@adventuras.no> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200610281549.37712.malcolm.kay@internode.on.net> Cc: Gary Kline , Lars Kristiansen Subject: Re: rsync does not --exclude: (??) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Oct 2006 06:19:41 -0000 On Sat, 28 Oct 2006 11:39 am, Lars Kristiansen wrote: > Gary Kline skrev: > > People, > > > > Weeks ago I tried this *without* the --exclude flags and > > overwrote DOT file that I didn't want to. Iust rechecked > > this use of rsync, saving important files from my work > > server elseswhere, and see that some files or directories > > are being listed and copied over. IDoes anything obvious > > jump out here? > > > > gary > > > > > > > > # > > ## test2ethos.sh > > # > > > > rsync -Cptuvaz -n -e "ssh -i > > /home/kline/.ssh/tao_XXXYYYZZZ-id" \ --exclude > > /home/kline/.zlogin \ > > --exclude /home/kline/.zshrc \ > > --exclude /home/kline/.zhistory.* \ > > --exclude /home/kline/.ctwrm \ > > --exclude /home/kline/.mozilla \ > > --exclude /home/kline/.evolution \ > > --exclude /home/kline/4zip/ \ > > --exclude '/home/kline/www/' \ > > /home/kline kline@ethos:/home/kline > > Hope this might help. > From man rsync: > "global include/exclude patterns are anchored at the "root of > the transfer" in man rsync look for: "INCLUDE/EXCLUDE PATTERN > RULES" and "ANCHORING INCLUDE/EXCLUDE PATTERNS" > Yes, it looks as though the anchoring of exclude arguments is more complex (or at least different) than I imagined. Never-the-less ambiguous arguments will still need to be quoted. Malcolm > Regards, Lars > > > if [ $? = 0 ] > > then > > echo "rsync transfer went okay: tao to ethos" > > else > > echo "rsync failed to ethos from /home/kline"|mail > > kline@thought.org fi > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org"