Bash wrap lines?

I'm trying to read the last couple of lines of a log file using a bash shell. tail -f /file works fine but for one small problem. The lines in the file are too long to display on the screen so it truncates them. I need to see the end/truncated part of the line. Is there a way to make tail do this or another program I can pipe the tail output into in order to see the entire line wrapped on screen?

Thanks!
LVL 1
albee01Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rbvoigtCommented:
I think tail only does that when the output is a tty... try piping the result through cat.
0
albee01Author Commented:
Nope. No such luck. cat does the same thing. I'm connected via ssh if that helps.
0
NVRAMCommented:
Neither tail nor cat truncate lines, so something *else* is causing your problem.

My first guess is that it's your terminal program.  You mention SSH (which also *should* not be truncating), but don't mention how.

What OS are you running locally -- Linux (or other *UX) , Windows, Mac?
What terminal program are you using?  Putty, Gnome-terminal, xterm, etc...

Try checking the settings for the program you're using and see if you don't have line truncation set, or scroll bars suppressed.

Also, on the remote machine try this:    stty -a
which should display a number for "columns" that should correspond to what you are using locally.

If it doesn't show a number that corresponds to your system, you *could* try this, which might or might not help:
    stty columns 80  

Good luck
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
albee01Author Commented:
NVRAM pointed me in the right direction so they get the points. It turns out to be a setting in Putty under the terminal section ("Auto wrap lines initially on") which was not selected.
0
NVRAMCommented:
Glad to help.  BTW, I'm a "he" not that it matters. ;-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Programming

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.