From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail01.tacticuscommunications.net (mail01.tacticuscommunications.net [74.2.138.133]) by speech.braille.uwo.ca (Postfix) with ESMTP id 62DC810A07 for ; Wed, 12 Nov 2008 19:23:34 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by mail01.tacticuscommunications.net (Postfix) with ESMTP id 2A83F36806 for ; Wed, 12 Nov 2008 19:24:46 -0500 (EST) Received: from mail01.tacticuscommunications.net ([127.0.0.1]) by localhost (mail01.tacticuscommunications.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KooW8ZCISb06 for ; Wed, 12 Nov 2008 19:24:44 -0500 (EST) Received: from [10.0.10.20] (unknown [10.0.10.20]) by mail01.tacticuscommunications.net (Postfix) with ESMTPA id 5A2D227803 for ; Wed, 12 Nov 2008 19:24:44 -0500 (EST) Date: Wed, 12 Nov 2008 19:24:56 -0500 (EST) From: luke To: "Speakup is a screen review system for Linux." Subject: Re: backup apparently not working In-Reply-To: <743A21CE437545AEA2D8604D06D123EA@tdsportable> Message-ID: References: <997FD392DD914C4985EC173F49BFC29E@tdsportable><879ED343CB4F40F886B951480AB68CEF@tdsportable><97D2198646D94C718C59C8E0A60D8C58@bouncy> <743A21CE437545AEA2D8604D06D123EA@tdsportable> Organization: Tacticus Communications, Inc. MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: speakup@braille.uwo.ca X-Mailman-Version: 2.1.11 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Nov 2008 00:23:34 -0000 On Sat, 8 Nov 2008, Tyler Littlefield wrote: > First, I'm running the script from command line: > ./backup.sh > the line in the script works great, but when I run it from the script, it says > it's cowardly refusing to create empty archives. Almost certainly, it doesn't know where your home directory is, and therefore doesn't know how to expand the tilde. Switch from using ~/whatever to $HOME/whatever, and make sure that $HOME is set. > Also, when it runs, it shows removing leading slash, and that's what's sent to > me in my cron mail. You might find the -C (that's a cap C) option useful, to remove all this business of directories and slashes and relative paths. > Is there a way I can direct errors to /dev/null from within the script? You can, but it is rather inadvisable--you want to see errors, you just want not to see warnings. You can get rid of warnings by using the command in a way that doesn't generate them. The -C option is one way to achieve this. "2> /dev/null" will redirect STDERR, if you really must. > It runs apt-get update > and then sends me mail with all the output--I've tried > apt-get update>/dev/null Forgive me, but you seem to have this urge to hide errors or unwanted output, rather than to run programs in a way which does not create them. While that seems as if it should be the same thing, it is not, because such hiding can be distructive when real errors (no space left on device, could not read block, etc.) occur. With apt-get (and most of the apt tools), a set of "-q" options, will get rid of all that updating output, and show you only real errors. For example: apt-get -q -q update Probably "apt-get -qq update" will also work, although I haven't tried it, since I have all of this aliased. Regards, Luke