From owner-freebsd-questions@FreeBSD.ORG Fri Oct 27 21:47:08 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 5C9A316A47E for ; Fri, 27 Oct 2006 21:47:08 +0000 (UTC) (envelope-from kline@magnesium.net) Received: from toxic.magnesium.net (toxic.magnesium.net [207.154.84.15]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50C9B43D8F for ; Fri, 27 Oct 2006 21:46:55 +0000 (GMT) (envelope-from kline@magnesium.net) Received: by toxic.magnesium.net (Postfix, from userid 1070) id 1F37DDA8A6; Fri, 27 Oct 2006 14:46:55 -0700 (PDT) Date: Fri, 27 Oct 2006 14:46:55 -0700 From: Gary Kline To: Malcolm Kay Message-ID: <20061027214655.GB22585@magnesium.net> References: <20061027174512.GA88552@thought.org> <200610280618.44238.malcolm.kay@internode.on.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200610280618.44238.malcolm.kay@internode.on.net> X-Organization: Thought.Org's Alt Site. User-Agent: Mutt/1.5.11 Cc: Gary Kline , freebsd-questions@freebsd.org 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: Fri, 27 Oct 2006 21:47:08 -0000 On Sat, Oct 28, 2006 at 06:18:44AM +0930, Malcolm Kay wrote: > On Sat, 28 Oct 2006 03:15 am, Gary Kline wrote: > > 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.* \ > > An ambiguous argument to the --exclude > option /home/kline/.zhistory.* will need to be quoted . . . > --exclude '/home/kline/.zhistory.*' \ > > otherwise it is expanded by the shell before reaching rsync > and then only the first referenced file is preceded by --exclude. > So instead of being excluded the transfer of the rest of the > expansion is emphasised. I don't know how rsync will then deal > with subsequent options. Hm, I didn't think I saw .ctwm.. Or .mozilla. Thanks much; I'll play around and see. gary > > > --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 > > 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 > > Malcolm > _______________________________________________ > 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" -- Gary Kline Seattle BSD Users' Group (seabug) | kline@magnesium.net Thought Unlimited Org's Alternate Email Site http://www.magnesium.net/~kline To live is not a necessity; but to live honorably...is a necessity. -Kant