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?
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
remove a combination of patterns from a file 15 79
How to check the PVU´s on AIX TSM servers? 3 131
Access_log 17 182
Writing a UNIX script menu allowing for multiple options. 5 100
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

738 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