I know ho to copy and paste using Putty, but I was wondering if there was a way to select and copy to clipboard the entire content of a file that is opened, say, with nano. Is this possible?

The reason I am asking is that I only seem to be able to copy the content that is visible in the Putty window.


You are only able to copy the contents of the currently visible text and the scrollback buffer. For an editor this does not work because it only uses the visible available terminal space to print the file. if you scroll up or down it 'redraws' the visible space with new information.

If you want to copy a large file, run more filename.txt, go to the end of the file (hit space multiple times) and scroll back in the buffer. You might need to increase the buffer to hold the entire file. This can be done under Settings->Window->Lines of scrollback.

| improve this answer | |
  • 19
    It is easier to use cat to display the file, this way you don't need to press space multiple times. – Tero Kilkanen Apr 14 '14 at 16:52
  • 2
    It would be, but you could be running the risk of displaying a binary file. more only displays text. – mtak Apr 14 '14 at 21:39

I keep 2 windows open. One is dedicated to copying. To get a file in the clipboard:


cat {your file}

Then Copy All.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.