Copy the entire content of a file opened in Putty to clipboard


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.

Best Answer

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.