How do I copy a few lines from one file to another file using the nano editor?
migrated from stackoverflow.com Feb 8 '13 at 14:54
This question came from our site for professional and enthusiast programmers.
Assuming you are in pure console mode and can't use the mouse to copy/paste:
NOTE: To switch between buffers use ESC-< and ESC->
An alternative to 2-4 above is to go to the line(s) you want to copy and CTRL-K to delete them, pressing CTRL-K repeatedly to multiple lines to the buffer. When you've cut all the lines you want to copy, CTRL-Y to re-paste them back into the current buffer. Then continue with step 5.