It seems that more
adds line breaks, whereas cat
does not. As a result cat
results will change to fit the terminal window if I resize the window, whereas more
results stay put with the line breaks added the first time. My question is why, and is there any way to make more
behave like cat
? (I really don't like this setting of more, when I copy I end up getting the line breaks that I don't want.)
1 Answer
Reading man more
:
-f Count logical lines, rather than screen lines (i.e., long lines are not folded).
preceded by:
OPTIONS
Options are also taken from the environment variable MORE (make sure to precede them with a dash (-)) but command-line options will override those.
So at your convenience you can either do:
more -f /some/file/with/long/lines
or export it in the MORE
variable:
$ export MORE=-f
$ more /some/file/with/long/lines
This should probably be put in some shell login script such as $HOME/.profile
.
-
I saw you asked "why" and admit I'm still dumbfounded at what historical reason probably related to vt100 behaviour or email conventions or even very old printer output (3 random wild guesses) made want having
more
doing this.– A.BMar 29, 2019 at 17:41 -
ah, I didn't realize 'fold' means something different from 'wrap' here. Thanks so much!!– welkinMar 29, 2019 at 18:18