From owner-freebsd-questions@FreeBSD.ORG Sat Aug 28 12:22:18 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DAE81065672 for ; Sat, 28 Aug 2010 12:22:18 +0000 (UTC) (envelope-from fwd@ichwilldichschmecken.de) Received: from keus02.synserver.de (www.hassblog.de [212.40.171.22]) by mx1.freebsd.org (Postfix) with ESMTP id 64D9C8FC1A for ; Sat, 28 Aug 2010 12:22:18 +0000 (UTC) Received: by keus02.synserver.de (Postfix, from userid 1000) id 3C552159D36; Sat, 28 Aug 2010 14:08:28 +0200 (CEST) Date: Sat, 28 Aug 2010 14:08:28 +0200 From: Thomas Keusch To: Bernt Hansson Message-ID: <20100828120828.GA7863@vs2.ichwilldichschmecken.de> References: <4C78F7BE.7060007@bah.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C78F7BE.7060007@bah.homeip.net> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions@freebsd.org Subject: Re: Cron problems 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 Aug 2010 12:22:18 -0000 On Sat, Aug 28, 2010 at 01:49:18PM +0200, Bernt Hansson wrote: Hell Bernt, > I'm having problems with lines like this in cron, works on the command > line, but not in cron. > > /sbin/dump -0uan -f - /usr | gzip -2 | ssh -c blowfish \ > targetuser@targetmachine.example.com dd > of=/mybigfiles/dump-usr-l0-"`date "+%Y-%m-%d--%H-%M-%S"`".gz you need to escape the percent-signs like that: \% For why see man 5 crontab Regards Thomas