public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* 1.7.7: window cuts off output / saving output
       [not found] <AANLkTik3fYVoeP97HrDwP8h3-jBbAr4qmco7EasOTECg@mail.gmail.com>
@ 2011-02-02 16:29 ` Rachel Trent
  2011-02-02 16:37   ` Corinna Vinschen
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rachel Trent @ 2011-02-02 16:29 UTC (permalink / raw)
  To: cygwin

I have a seemingly simple problem that I either haven't found the
answer to or I didn't understand the answer when I saw it. I presume
I'm not describing it with the correct terminology...

Short version:
In layman's terms, the Cygwin window cuts off at the top, and I'd like
to know if the output that's been cut off is forever lost or if I
might be able to save it to a file or view it some other way.

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?

In the Cygwin FAQ, there seem to be some references to limited memory
and increasing buffers, but I'm not sure I fully understand them.
Also, I have already run the script and the process has already been
printed to the screen. I'm hoping for a retroactive fix. Seems like a
simple issue, but I can't find anyone else talking about it!

Thanks for your help,
Rachel

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 1.7.7: window cuts off output / saving output
  2011-02-02 16:29 ` 1.7.7: window cuts off output / saving output Rachel Trent
@ 2011-02-02 16:37   ` Corinna Vinschen
  2011-02-02 16:44   ` Jeremy Bopp
  2011-02-02 16:46   ` Rance Hall
  2 siblings, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2011-02-02 16:37 UTC (permalink / raw)
  To: cygwin

On Feb  2 11:13, Rachel Trent wrote:
> I have a seemingly simple problem that I either haven't found the
> answer to or I didn't understand the answer when I saw it. I presume
> I'm not describing it with the correct terminology...
> 
> Short version:
> In layman's terms, the Cygwin window cuts off at the top, and I'd like
> to know if the output that's been cut off is forever lost or if I
> might be able to save it to a file or view it some other way.
> 
> 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?

This is not a Cygwin problem.  The scrollback buffer is provided by the
underying Windows console.  You can change that in the console window
properties dialog.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 1.7.7: window cuts off output / saving output
  2011-02-02 16:29 ` 1.7.7: window cuts off output / saving output Rachel Trent
  2011-02-02 16:37   ` Corinna Vinschen
@ 2011-02-02 16:44   ` Jeremy Bopp
  2011-02-02 16:49     ` Jeremy Bopp
  2011-02-02 16:46   ` Rance Hall
  2 siblings, 1 reply; 5+ messages in thread
From: Jeremy Bopp @ 2011-02-02 16:44 UTC (permalink / raw)
  To: cygwin

On 2/2/2011 10:13 AM, Rachel Trent wrote:
> I have a seemingly simple problem that I either haven't found the
> answer to or I didn't understand the answer when I saw it. I presume
> I'm not describing it with the correct terminology...
> 
> Short version:
> In layman's terms, the Cygwin window cuts off at the top, and I'd like
> to know if the output that's been cut off is forever lost or if I
> might be able to save it to a file or view it some other way.

The exact solution for increasing your scrollback buffer is dependent
upon the terminal you're using.  If you're using mintty, you can find
the option in the Options dialog within the Window section.  If you're
using the Windows cmd terminal, and it sounds like you are, you can find
the option you need in the Properties dialog on the Layout tab.  Change
the height of the screen buffer to whatever you need.

All of that is just a quick hack though because you could always have
output that is longer than your scrollback buffer.  What follows is not
Cygwin-specific, but you don't seem to know about this stuff yet.

If you need to be sure to always have your command's complete output
available, you need to redirect its output to a file.  e.g.)

create_output --lots-of-it > out.log

If you would like to see the output as it goes by and still save it all,
pipe your command's output to the tee program and give tee the path to a
file as an argument into which the output will also be recorded.  e.g.)

create_output --lots-of-it | tee out.log

Now you can review out.log at your leisure using a text editor or a
simple pager.  You can also just send the output to a nice pager such as
less if you don't mind interacting with the pager a bit in order to let
your command complete.  e.g.)

create_output --lots-of-it | less

-Jeremy

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 1.7.7: window cuts off output / saving output
  2011-02-02 16:29 ` 1.7.7: window cuts off output / saving output Rachel Trent
  2011-02-02 16:37   ` Corinna Vinschen
  2011-02-02 16:44   ` Jeremy Bopp
@ 2011-02-02 16:46   ` Rance Hall
  2 siblings, 0 replies; 5+ messages in thread
From: Rance Hall @ 2011-02-02 16:46 UTC (permalink / raw)
  To: cygwin

On Wed, Feb 2, 2011 at 10:13 AM, Rachel Trent <retrent@ncsu.edu> wrote:
<snip>
>
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: 1.7.7: window cuts off output / saving output
  2011-02-02 16:44   ` Jeremy Bopp
@ 2011-02-02 16:49     ` Jeremy Bopp
  0 siblings, 0 replies; 5+ messages in thread
From: Jeremy Bopp @ 2011-02-02 16:49 UTC (permalink / raw)
  To: cygwin

On 2/2/2011 10:44 AM, Jeremy Bopp wrote:
> All of that is just a quick hack though because you could always have
> output that is longer than your scrollback buffer.  What follows is not
> Cygwin-specific, but you don't seem to know about this stuff yet.

Sorry to reply to myself, but I just realized that you *do* know about
the tee program.  That's what I get for being too aggressive with
pruning quoted messages.

-Jeremy

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-02 16:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AANLkTik3fYVoeP97HrDwP8h3-jBbAr4qmco7EasOTECg@mail.gmail.com>
2011-02-02 16:29 ` 1.7.7: window cuts off output / saving output Rachel Trent
2011-02-02 16:37   ` Corinna Vinschen
2011-02-02 16:44   ` Jeremy Bopp
2011-02-02 16:49     ` Jeremy Bopp
2011-02-02 16:46   ` Rance Hall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).