On Thu, Jan 22, 2004 at 08:52:58PM +0000, Pigeon wrote: | On Thu, Jan 22, 2004 at 12:15:31PM -0500, Derrick 'dman' Hudson wrote: | > I have a shell script on one debian system here to back up certain | > portions of the filesystem. It simply tars up the directories and | > moves the tar file to a samba share which is backed up by some already | > in-place windows software. | > | > The problem is that mv is too noisy : | > mv: failed to preserve ownership for `/mnt/red1/Builds/cvsbackup/CVS-Backup-2004-01-21.tar.gz': Operation not permitted | > | > This is a problem because I then become conditioned to ignore emails | > from cron assuming they only contain this non-problem. However, | > sometimes there is a real problem and I need to know about it. | > Therefore, I want this particular error message to not be reported, | > however I want other errors (for example No space left on device) to | > go to stderr. When this script is run, stdout is sent to a log file | > and stderr (if any) is sent to me via mail. | > | > Any suggestions? | | Well, AFAIK mv never prints anything on stdout, so perhaps: | | mv from-name to-name 2>&1 | grep -v 'failed to preserve ownership' 1>&2
This is what I did, and it seems to be working. Thanks :-). -D -- Even youths grow tired and weary, and young men stumble and fall; but those who hope in the Lord will renew their strength. They will soar on wings like eagles; they will run and not grow weary, they will walk and not be faint. Isaiah 40:31 www: http://dman13.dyndns.org/~dman/ jabber: [EMAIL PROTECTED]
signature.asc
Description: Digital signature