Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-17-2008, 06:21 AM
|
#1
|
|
LQ Newbie
Registered: Nov 2007
Posts: 12
Rep:
|
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
|
|
|
|
11-17-2008, 06:35 AM
|
#2
|
|
Senior Member
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,084
|
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.
|
|
|
|
11-17-2008, 06:55 AM
|
#3
|
|
LQ Newbie
Registered: Jan 2006
Location: Maryland, USA
Distribution: Slackware & Arch (at the moment)
Posts: 15
Rep:
|
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.
|
|
|
|
11-17-2008, 07:53 AM
|
#4
|
|
Gentoo support team
Registered: May 2008
Location: Lucena, Córdoba (Spain)
Distribution: Gentoo
Posts: 3,971
|
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.
|
|
|
|
11-17-2008, 01:43 PM
|
#5
|
|
Member
Registered: Jun 2005
Location: England
Distribution: SLED, openSUSE
Posts: 982
Rep: 
|
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.
|
|
|
|
11-17-2008, 02:54 PM
|
#6
|
|
Guru
Registered: Jan 2001
Posts: 24,128
Rep: 
|
Run the program again and output it to a file.
./command-that-fails > output.log
|
|
|
|
11-17-2008, 03:01 PM
|
#7
|
|
Member
Registered: Jun 2005
Location: England
Distribution: SLED, openSUSE
Posts: 982
Rep: 
|
Quote:
Originally Posted by trickykid
Run the program again and output it to a file.
./command-that-fails > output.log
|
Error messages probably got to stderr though...
Code:
./command-that-fails &> output.log
|
|
|
|
11-17-2008, 03:04 PM
|
#8
|
|
Guru
Registered: Jan 2001
Posts: 24,128
Rep: 
|
Quote:
Originally Posted by arizonagroovejet
Error messages probably got to stderr though...
Code:
./command-that-fails &> output.log
|
Ah true, I'm sleepy.. half ass answers still count don't they? 
|
|
|
|
11-17-2008, 03:16 PM
|
#9
|
|
Member
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Ubuntu 12.04 X86_64
Posts: 954
Rep:
|
try highlighting the text and pressing
^insert
use shift+insert to paste
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 02:54 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|