I have just installed the latest stable version of FreeBSD to a computer and I have the following problem:
If, in Putty, I issue a command like ps uxa
which gives long lines of output, they get cropped. ps uxa|more
doesn't help. Even if I do ps uxa > file.txt
, lines are cropped to 80 chars in the file!
There are some images of how it looks like: http://yfrog.com/0rfilecroppx
This happens right after clean installation, with everything set to default. Default shell is csh, changing it to bash didn't help. This has never happened to me in Linux.
My uname -a
FreeBSD freebsd.localdomain 8.0-RELEASE FreeBSD 8.0-RELEASE #0: Sat Nov 21 15:48:17 UTC 2009
[email protected]:/usr/obj/usr/src/sys/GENERIC i386
How to fix this problem? I have already looked at env vars, .profile, .cshrc, /etc/login.conf.
Try using the
-w
option:From the MAN page:
This is a feature/bug of putty, not FreeBSD. putty always tells the other OS what its width and height are. You can show this easily by doing one of your truncating
ps
commands, then widen the putty screen. You can see that the lines were truncated. Now give theps
comand again: you will see more columns.In essence, what you are asking putty to do is to lie about the width of your window (giving a number larger than what it really is showing) and to wrap the longer lines intelligently. That will work fine for
ps
andls -l
and so on, and fail miserably forvi
or any other full-screen editor. Such lying can also cause display of information that can be misinterpreted because of the wrapping. There may be a mode of putty that does this, but I could not find it.