LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 10-12-2012, 06:05 AM   #1
bulma77
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Rep: Reputation: Disabled
copy paste from inside a file


Hi everyone,

basic question:
I want to copy/paste few lines in a file.
Here is what I do:

cat file |less
select the lines with the mouse

and then I get lost....
please help

thanks much appreciated
 
Old 10-12-2012, 06:11 AM   #2
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Rep: Reputation: 22
you should be able to RightClick and use 'Copy'
(if your in X that is)
 
Old 10-12-2012, 06:13 AM   #3
bulma77
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
right click does not give me the option.
Quote:
(if your in X that is)
what do you mean?
 
Old 10-12-2012, 06:16 AM   #4
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Rep: Reputation: 22
X = the graphical user interface, GNOME, KDE etc

what distro are you using?

Last edited by Basher52; 10-12-2012 at 06:18 AM.
 
Old 10-12-2012, 06:17 AM   #5
bulma77
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
unfortunately it is not in X.
Im SSH into it though
 
Old 10-12-2012, 06:20 AM   #6
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Rep: Reputation: 22
oh OK

Mark the rows then push CTRL-INSERT (for copy)
and to paste: SHIFT-INSERT
 
1 members found this post helpful.
Old 10-12-2012, 06:27 AM   #7
bulma77
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
thanks appreciated!!
 
Old 10-12-2012, 06:28 AM   #8
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Arch
Posts: 401

Rep: Reputation: 22
also, mark this post as solved, please
 
Old 10-12-2012, 07:15 AM   #9
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you do not need cat: less <filename> works also. The problem is less opens the file as read only, it cannot modify the content. You need to use an editor.
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Script to copy paste text from one file to another (overwriting part of the file) freet Programming 4 04-19-2011 03:23 PM
[SOLVED] need to copy all " *.SEED " files and paste them inside a new folder each time rastin_nz Programming 1 11-03-2010 05:02 PM
[SOLVED] How to copy-paste part of line within the file? guessity Linux - Newbie 10 12-25-2009 01:25 AM
Copy Text File and Paste to /hdd CD-RW aquatux SUSE / openSUSE 3 12-29-2006 06:32 AM
How do you copy and paste a file from a command prompt? thenewguy05 Linux - Newbie 6 07-13-2004 03:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration