How to copy output from a terminal?

Linux for blind general discussion blinux-list at redhat.com
Tue Nov 30 14:46:31 UTC 2021


Aside from piping output to tee, you can also redirect output directly
to a file.

command > ouput.txt

will redirect stdout to output.txt, overwriting the contents of
output.txt in the process. changing to two right angle brackets will
append instead, and putting a two in front of the angle brackets will
redirect stderr to the file instead... No idea if it's possible to
redirect both stdout and stderr at the same time, either to the same
file or to different files, though my experience is that it's fairly
rare for there to be enough mixing of stdout and stderr you actually
need both to give proper context when asking for help.

Though, would anyone mind explaining why one might want to use tee
over simple redirection?

On 11/30/21, Linux for blind general discussion <blinux-list at redhat.com> wrote:
> That log you created with tee should be in your current directory.  If you
> ran this in your user directory it would be in your user directory.
>
>
> On Tue, 30 Nov 2021, Linux for blind general discussion wrote:
>
>> OK and where can I find that log? If I write startx to login to Mate, I
>> have
>> long bug.
>>
>> Vojta.
>>
>> Dne 30. 11. 21 v 11:26 Linux for blind general discussion napsal(a):
>> > Your problem is that errors go to stderr and normal output goes to
>> > stdout,
>> > but never fear Linux has you covered.
>> > $ ./command 2>&1 | tee -a command.log
>> > That sends those errors to stdout and tee writes all of that into
>> > command.log
>> >
>> >
>> > On Tue, 30 Nov 2021, Linux for blind general discussion wrote:
>> >
>> >> Hello,
>> >>
>> >> and what about copying errors? I can't boot to Stormux in Mate desktop
>> >> and
>> >> I
>> >> have long bug. How can I save it, when I am in console? is some way to
>> >> share
>> >> it with Storm and others? If I write them I have some bug, they cannot
>> >> help
>> >> me, because some bug is really large termine.
>> >>
>> >> Thanks.
>> >>
>> >> Best regards
>> >>
>> >> Vojta.
>> >>
>> >> Dne 30. 11. 21 v 10:42 Linux for blind general discussion napsal(a):
>> >>> $ ./startwin.sh|tee startwin.log does it destructively.
>> >>> $ ./startwin.sh | tee -a startwin.log does it non-destructively and
>> >>> appends onto an existing file with the same name.
>> >>>
>> >>>
>> >>> On Tue, 30 Nov 2021, Linux for blind general discussion wrote:
>> >>>
>> >>>> Hi all,
>> >>>>
>> >>>>
>> >>>> I still have a few things I need to fix, but as the subject states,
>> >>>> I
>> >>>> don't
>> >>>> know how to copy the output from a terminal so I can ask for help
>> >>>> from
>> >>>> the
>> >>>> relevant mailing lists/forums.
>> >>>>
>> >>>>
>> >>>> I am using Mate-Terminal with Orca in Fedora Mate Compiz 35. I know
>> >>>> you
>> >>>> can
>> >>>> copy text off a console using speakup, but I am not in a console, now
>> >>>> am
>> >>>> I?
>> >>>>
>> >>>>
>> >>>> If anyone has any advice, I'd be appreciative. If there is a way,
>> >>>> for
>> >>>> example
>> >>>> to pype the output from a command to a text file, for example if I
>> >>>> type
>> >>>>
>> >>>>
>> >>>> $ ./startwin.sh
>> >>>>
>> >>>> Which is how I would start my qemu Windows VM, can I pype the output
>> >>>> to a
>> >>>> text
>> >>>> file in '~/'?
>> >>>>
>> >>>>
>> >>>
>> >>> _______________________________________________
>> >>> Blinux-list mailing list
>> >>> Blinux-list at redhat.com
>> >>> https://listman.redhat.com/mailman/listinfo/blinux-list
>> >>>
>> >>
>> >> _______________________________________________
>> >> Blinux-list mailing list
>> >> Blinux-list at redhat.com
>> >> https://listman.redhat.com/mailman/listinfo/blinux-list
>> >>
>> >>
>> >
>> > _______________________________________________
>> > Blinux-list mailing list
>> > Blinux-list at redhat.com
>> > https://listman.redhat.com/mailman/listinfo/blinux-list
>> >
>>
>> _______________________________________________
>> Blinux-list mailing list
>> Blinux-list at redhat.com
>> https://listman.redhat.com/mailman/listinfo/blinux-list
>>
>>
>
> _______________________________________________
> Blinux-list mailing list
> Blinux-list at redhat.com
> https://listman.redhat.com/mailman/listinfo/blinux-list
>
>




More information about the Blinux-list mailing list