LinuxQuestions.org
Help answer threads with 0 replies.
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, 07: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, 07:11 AM   #2
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Fedora, CentOS, Scientific Linux
Posts: 275

Rep: Reputation: 10
you should be able to RightClick and use 'Copy'
(if your in X that is)
 
Old 10-12-2012, 07: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, 07:16 AM   #4
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Fedora, CentOS, Scientific Linux
Posts: 275

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

what distro are you using?

Last edited by Basher52; 10-12-2012 at 07:18 AM.
 
Old 10-12-2012, 07: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, 07:20 AM   #6
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Fedora, CentOS, Scientific Linux
Posts: 275

Rep: Reputation: 10
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, 07:27 AM   #7
bulma77
LQ Newbie
 
Registered: Aug 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
thanks appreciated!!
 
Old 10-12-2012, 07:28 AM   #8
Basher52
Member
 
Registered: Mar 2004
Location: .SE
Distribution: Fedora, CentOS, Scientific Linux
Posts: 275

Rep: Reputation: 10
also, mark this post as solved, please
 
Old 10-12-2012, 08:15 AM   #9
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,133

Rep: Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273Reputation: 2273
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 04: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 06:02 PM
[SOLVED] How to copy-paste part of line within the file? guessity Linux - Newbie 10 12-25-2009 02:25 AM
Copy Text File and Paste to /hdd CD-RW aquatux SUSE / openSUSE 3 12-29-2006 07:32 AM
How do you copy and paste a file from a command prompt? thenewguy05 Linux - Newbie 6 07-13-2004 04:41 PM


All times are GMT -5. The time now is 08:38 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration