From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25428 invoked by alias); 2 Feb 2011 16:46:17 -0000 Received: (qmail 25420 invoked by uid 22791); 2 Feb 2011 16:46:15 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-qw0-f43.google.com (HELO mail-qw0-f43.google.com) (209.85.216.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 02 Feb 2011 16:46:10 +0000 Received: by qwk3 with SMTP id 3so173826qwk.2 for ; Wed, 02 Feb 2011 08:46:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.224.3.3 with SMTP id 3mr9085943qal.103.1296665168684; Wed, 02 Feb 2011 08:46:08 -0800 (PST) Received: by 10.220.4.130 with HTTP; Wed, 2 Feb 2011 08:46:08 -0800 (PST) In-Reply-To: References: Date: Wed, 02 Feb 2011 16:46:00 -0000 Message-ID: Subject: Re: 1.7.7: window cuts off output / saving output From: Rance Hall To: cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2011-02/txt/msg00051.txt.bz2 On Wed, Feb 2, 2011 at 10:13 AM, Rachel Trent wrote: > > Long version: > Within a larger script, I copied over a thousand files from one server > to another using the following command: > cp -R -n -p -v "$package" "$destination" | tee -a "$destination"/copiedfiles.txt > > However, several files failed to copy due to permissions issues/etc, > and the copiedfiles.txt file does not include the error information. > The onscreen output does include this information (due to using the -v > verbose option), however I can only scroll up to see about 300 lines > of information (surprise! I wasn't expecting this). My question is: > can I somehow access the output that was cut off? > I don't happen to think that "tee" is the right tool here. The standard way to do this and record the error messages is with redirection. In standard linux the screen output is from the stdout device and the error message is printed to the stderr device with a standard screen setup both stdout and stderr are the screen, but when you are recording data to a log file for historical needs, you have to redirect stderr to stdout so that the tee command can actually see it. add a 2>&1 to the cp command at the end before the pipe, and tee will get the errors as well. BTW this is generically true for all POSIX compatible screen based tools. Rance -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple