Halvor Raknes
Member
I have run an app which produces thousands of lines of screen output. How can I copy all of it so that I can paste it into a text editor (to search for stuff)?
Dude, no worries! I got you covered. To copy all that gnarly output, you can pipe it to theI have run an app which produces thousands of lines of screen output. How can I copy all of it so that I can paste it into a text editor (to search for stuff)?
tee
command. Just use this syntax:your_command | tee file.txt
file.txt
. Once you've done that, you can open file.txt
with your favorite text editor and search away!your_command > file.txt
Whoa, my bad for not catching that, dude! If you want to save the existing text in your terminal window, you can use a nifty little keyboard shortcut. Just hitOK, but that doesn't give me access to the text that is currently in my terminal window! How can I save all of that now?
Ctrl+Shift+C
to copy all the text, and then you can paste it into your text editor of choice. My bad, bro! Sorry for the confusion.That doesn't work! The problem is marking all the text that is beyond the screen.
script
command. script
without any arguments.exit
to end the script session.typescript
in your current directory. This file contains the entire terminal session, including all the output that was beyond the visible screen.typescript
file with your favorite text editor, and you'll have access to all that text, ready to be searched or copied wherever you want. Stay groovy, mate!Apologies for the misunderstanding, dude! My bad.Hey! I am talking about text that EXISTS CURRENTLY in a terminal window! Not stuff to be done in the future!
Ctrl+Shift+C
to copy it.Yo dude, my bad for not fully understanding your question. I apologize for that.And what about the THOUSANDS of lines that are beyond the terminal window?
Please read my consecutive posts in the context of what I have already presented!
scrollback
feature of your terminal emulator. Here's how to do it in a few popular terminal emulators:Ctrl+Shift+C
.Ctrl+Shift+C
.Ctrl+Shift+C
.Apologies once again, dude. I misunderstood your situation.I can't HOLD THE SCROLL WHEEL (or which is worse in my case, pushing down on the touchpad) for 20 minutes!
less
command. For example:your_command | less
less
pager, allowing you to navigate through the text using the arrow keys.less
, press G
to jump to the end of the output. This way, you'll be able to see and access all the text that exists beyond the terminal window.v
to enter "visual" mode. Now you can use the arrow keys to navigate and select the desired text.y
to copy it.Hey, I'm sorry if I wasn't able to provide a solution that meets your needs, dude. I totally understand your frustration. Sometimes, the limitations of certain tools or setups can be a bummer.OK, so my problem cannot be solved! THIS SUX!
>
. For example:your_command > output.txt
You're welcome, dude! I apologize for not being able to provide the exact solution you were looking for. If you have any other questions or need assistance with anything else, feel free to ask. I'm here to help in any way I can. Keep rockin' and stay positive!Thanks anyway…
I hear you, dude. It's understandable that you'd expect the Linux development community to address such issues. Let me shed some light on this.Is this really a problem that somebody in the Linux development community hasn't identified as an ACTUAL issue that ought to be remedied?
I do realize this is a problem for newbies only, but it's a real issue that can have serious ramifications if it cannot be solved in a precipitous crisis.
I'd like to hear from some serious OS developers why they cannot be bothered (or simply, for some peculiar technical systemic reason, cannot) to fix!
You make a valid point, dude. Basic functionalities like text selection and scrolling are indeed fundamental requirements for terminal emulators. It's understandable that the absence of such functionalities can be frustrating, especially when dealing with large amounts of output.I would suggest this is a core issue related to all terminal emulators, basic on the level of being able to copy text or scroll. That's why I find it a little hard to understand why the absence of this functionality which I request has been left to be ignored for the decades that have passed since the first terminal emulators EVER were written.