How to turn off word wrap with "more"

Posted on 2004-08-27
Last Modified: 2008-03-04
I am running AIX 5. Is there any way to turn off word wrapping when using the "more" command? Or is there a different text viewer tool I can use that can turn off auto text wrap in AIX? Thanks.
Question by:chinhdo1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 21

Accepted Solution

tfewster earned 200 total points
ID: 11916505
`pg -f filename` is supposed to prevent wrapping, but doesn't seem to work.

You could use `cut -c1-80 filename |more`

To save hassle, make it a shell script:
# m - Truncate lines to 80 chars & pipe to more
# Usage: `m filename`
cut -1-80 $1 |more


Assisted Solution

michaelato earned 50 total points
ID: 11918962
tfewster's suggestion is what I do.  My only change might be to use "79" instead of "80" to prevent long lines putting an extra linefeed in your output -- but try 80 first.

Or use a telnet client that allows more columns, if you know the lines you're viewing are of a limited length eg. 200 characters.

Author Comment

ID: 11922240
Good suggestions... but is there a tool that would allow to scroll to the right as well? Like Notepad/Textpad on Windows?
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

LVL 21

Expert Comment

ID: 11922393
Check out /usr/bin/dt/dtpad - a full GUI text editor

Author Comment

ID: 11934694
tfewster: unfortunately /usr/bin/dt/dtpad is not available on my AIX install system.

I am going to keep this thread open a while longer to see if anyone else has a better solution.
LVL 21

Expert Comment

ID: 11935381
dtpad is part of the X11 software set - X11.Dt.rte - if you decide to install it

Expert Comment

ID: 12156406
There's a replacement for `more' called `less' -- it will scroll horizontally among other useful things.  You may find that on your system `more' is actually `less' -- try entering `-S' (without the quotes) while viewing a file.
LVL 21

Expert Comment

ID: 12162086
Good call, svs!

"less" is only standard with Linux & Solaris, but the GPL sources can be downloaded from  and it's been tested on AIX (and just about every other OS ;-)

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question