copying less output with putty


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers copying less output with putty
# 1  
Old 01-05-2011
copying less output with putty

I am attempting to copy long lines from "less" to notepad++ logged into remote system using putty but im having all sorts of problems. When i run "less filename" the lines wrap so when i copy and paste into notepad++ what should be a single line is showing as multiple lines. If i run less -S filename i get the full length of the line but i cant figure out how to copy this, as to see the full line I have to scroll across with the arrow key and when i do this the text i have previously copied is lost from the clipboard. In Putty using the Copy All to clipboard does not copy the data that you have to horizontally scroll across to see (although it did on one occasion have not been able to get it to do this again). Could anyone give me some info on how to do this.

Thanks
# 2  
Old 01-05-2011
Buy a bigger monitor Smilie.

seriously:
Code:
cat filename | tail -n #

I don't have less, but more suffers from the same problem. cat seems to work.

Last edited by purdym; 01-05-2011 at 10:09 AM.. Reason: changed 'head' to 'tail'.
This User Gave Thanks to purdym For This Post:
# 3  
Old 01-05-2011
I had the same problem on an obsolete flavor of Unix. I compiled a newer version of less and the problem went away.
# 4  
Old 01-05-2011
Most lines are hundreds of characters across. I'm also wandering if a line feed is added by less to wrap the text. Anyone know of any ssh clients/terminals that dont do this or allow you to copy a full line in a single action.
# 5  
Old 01-07-2011
more and less have the problem but tail works good. Thanks purdym. It does seem to be due to an obsolete less version but cant do anything about that. Strange though for this to be installed on Solaris 10.
# 6  
Old 01-07-2011
Have you tried outputting to a file on the remote system, converting that file to M$ text format, and then copying the file to the PC with Putty's PSCP command. Alternatively just sftp the file in ascii mode.
# 7  
Old 01-07-2011
agreed, an interactive graphical terminal plus copy-paste really aren't the right tools for transferring large amounts of data. It's awkward no matter how you cut it.

you could also use PUTTY's plink utility to run a remote command and redirect its output into a local file, getting rid of the middleman of a temp file on the server. plink connects just like putty but purely commandline, letting you do things like redirection on it. You should be able to use it like this (from windows cmd prompt):

Code:
c:\users\useryname> plink -batch -pw password user@host remotecommand parameter ... > logfile.txt
c:\users\useryname>


Last edited by Corona688; 01-07-2011 at 11:55 AM..
These 2 Users Gave Thanks to Corona688 For This Post:
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

Sco 3.2 and PuTTY

Is there anyway to the function keys to work on PuTTY when remoting into a SCO 3.2 server? (8 Replies)
Discussion started by: steveo314
8 Replies

2. UNIX for Dummies Questions & Answers

Getting command output to putty window title.

Hi, Last 2 weeks I have searched many forums and i haven't found the answer for the question: How to get all command output to Putty title? Needed it for other programs to know when some jobs on a server is done and is it done right or wrong. Plink stdout and stdin wasn't working, i used many... (1 Reply)
Discussion started by: domagaj
1 Replies

3. UNIX for Dummies Questions & Answers

Regarding PUTTY

Hello Forum members There is no any time parameter on putty so how can I stay my putty ssh session always Alive? So please reply to my querry. I am looking forward from Forum. Advance Thanks Siva. (5 Replies)
Discussion started by: workforsiva
5 Replies

4. UNIX for Dummies Questions & Answers

Regarding the logs on putty

Hi Folks, I have an application and I connect to unix box through putty , sometimes I Have to check the logs and for that I reached to particular directory and write tail -f abc.log Is there any better command so that these logs are dynamically go on increasing while I work on my application... (6 Replies)
Discussion started by: KAREENA18
6 Replies

5. Red Hat

Putty Command

Hi, I am trying to update my site using putty. My server is in linux. I found few commands that help me to access and do few stuffs in the server. Please add additional command. ls - to list files in a directory: cd - change directory (navigate to some directory): cp - copy a file: mv - move... (5 Replies)
Discussion started by: khadkabirendra
5 Replies

6. UNIX for Advanced & Expert Users

Help for PuTTy.

I'm using PuTTY to establish a SSH connection to a remote UNIX machine. I need to fetch a file from the remote system into my local Windows system. Is it possible? If yes, how can I do that? (2 Replies)
Discussion started by: agnivaccent
2 Replies

7. UNIX for Dummies Questions & Answers

Copying the output of a shell to another

How do you copy the output of a shell to another? I went to, for example, copy the output of shell a to shell b. Do you use cp or what? (2 Replies)
Discussion started by: #moveon
2 Replies

8. UNIX for Dummies Questions & Answers

putty script

i was having problem on unix command.here's my script set server_exe="C:\filecopy\putty.exe" %server_exe% sgxaspecs3@sporc01 -pw pit54321 -b c:\filecopy\file_sporc01putfiles2.txt echo "file uploaded to SFTP Server" pause ok the thing is like this, i could login to putty by running this... (1 Reply)
Discussion started by: dannyd_y
1 Replies

9. UNIX for Dummies Questions & Answers

putty

i am connecting to a unix-application using putty (xp). sometime, it is as if the putty is sending a form-feed char, because i am getting a blank screen, and by back scrolling i see the previous screen with all the related data. if i am using the xp-telnet, i get the screen/data correctly. ... (7 Replies)
Discussion started by: mifa-system
7 Replies

10. News, Links, Events and Announcements

PuTTY 0.59

On my opinion, one of the best ssh/telnet clients for windows, putty released a new version: Get it here, PuTTY 0.59 - PuTTY can now connect to local serial ports as well as making network connections. - Improved speed of SSH, particularly SSH-2 key exchange and public-key authentication -... (2 Replies)
Discussion started by: pressy
2 Replies
Login or Register to Ask a Question