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

Re: Quiet tarring



How about tar -f abc dir 2&1>/dev/null ?


Liguo (Leo)



Karen Ellrick wrote:

> I know this is a little off topic (not really an installation question), but
> does anyone know how I can get a tar command that is being run from a cron
> job to be a little quieter, or how to avoid the errors it is getting in the
> first place?
>
> Explanation: I am making a tar ball every hour of /var/log (among other
> things) on a couple machines, for the purpose of saving the info on another
> machine in case of a hardware failure.  But sometimes (in the case of
> /var/log/maillog, about 30% of the time) one of the files is changing while
> the tar is going on, and I get a message from the cron daemon like this:
>    tar: /var/log/maillog: file changed as we read it
>    tar: Error exit delayed from previous errors
> It sounds very serious, but when I look at the actual tarball, it seems to
> have successfully pulled in all the files, including the one that caused the
> error (I haven't verified contents, but the file is there, and it has size).
> I looked for a way to get tar to run more gracefully and/or quietly, but the
> manual page for tar should win an award for terseness - it contains
> absolutely no explanatory verbage after the list of its many options with a
> half-line description of each.  There is no -q option.  I'm a little afraid
> to just redirect stderr to /dev/null, because one day there may be something
> important.  But I don't want several messages a day from my cron daemon
> either.  If there is a way to get it to retry changing files instead of
> generating errors, that would be ideal, because there are certainly plenty
> of non-busy moments in the life of a maillog - but I don't know how to make
> it do that.  Any ideas or comments from experience?
>
> Karen
>
> --------------------------------
> Karen Ellrick
> S & C Technology, Inc.
> 1-21-35 Kusatsu-shinmachi
> Hiroshima  733-0834  Japan
> (from U.S. 011-81, from Japan 0) 82-293-2838
> --------------------------------
>
> _______________________________________________
> Redhat-install-list mailing list
> Redhat-install-list redhat com
> https://listman.redhat.com/mailman/listinfo/redhat-install-list





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