[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mv: permissions warning with samba mount



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

-- 
Pigeon

Be kind to pigeons
Get my GPG key here: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x21C61F7F

Attachment: pgpX9QIfSuDza.pgp
Description: PGP signature


Reply to: