Copy lines from console
Hi everyone,
I am trying to copy some lines from my console, but i was unable to do it. Anyone please tell me how to copy lines from console. Actually i ran a program it shows some error. I want to copy this error from console and paste it into other place. is there anyone knows it , please help me. saidul |
Which sort of terminal?
In X with konsole/terminal/xterm etc you usually just select the text with mouse and use right click to paste. You can also redirect the output into a file: <command> > error.log Then all output will go into error.log. Use 2> error.log for only errors. |
You don't mention which distro you're using, but whichever it is, see if it comes with gpm. I use Slackware and it comes with GPM. What I do inside X or not is position my cursor where I want the text to go, highlight the text I want to copy, then click the middle mouse button where the cursor is.
|
Besides gpm and redirection, another option is to use screen, which amongst many useful things, can be used to copy and paste text as well, only inside the same screen session though, so it will not help you if you want to paste from a terminal into an X based text editor.
|
If you're using Konsole in KDE then highlight the text and then select 'Copy' from the Edit menu.
In KDE 4 you can also highlight then right click and select 'copy', maybe you can in KDE 3 too but I can't remember and don't have it to hand to try. |
Run the program again and output it to a file.
./command-that-fails > output.log |
Quote:
Code:
./command-that-fails &> output.log |
Quote:
|
try highlighting the text and pressing
^insert use shift+insert to paste |
All times are GMT -5. The time now is 04:34 AM. |