Change in PVE8 `more` behavior, no longer like `cat

promoxer

Member
Apr 21, 2023
226
23
23
1. When I run `more <filename>` in PVE8, it clears the whole screen and show contents from the top of the CLI
2. In PVE7 and other Linux I used, `more` always behaved more like `cat`, except `more` has pagination
3. Any idea why this is happening? And can I make `more` behave like `cat` again?
 
Last edited:
You probably want to start using less. The man page (man more) says:

Users should realize that less(1) provides more(1) emulation plus extensive enhancements.

less -F will display a file like cat if it does not fill more than the entire terminal window. If it does, it will use pagination.
 
Last edited:
Thanks, I should probably just alias more to cat, too used to typing `more <file>`, why did they make such a breaking change..
 
Thanks, I should probably just alias more to cat, too used to typing `more <file>`, why did they make such a breaking change..
Dug into this a bit, looks like a POSIX compliance thing [1]. But if you are already alias-ing more, which is a standard command, I'd really recommend you alias it to less -F or maybe consider alias more="LESS_IS_MORE=1 less -F". This will only paginate when there is more than one screen of content. It will also make less behave like more in other ways.

[1]: https://github.com/util-linux/util-linux/commit/df6b29d3b8e9a55d2bfa69c593e17da4d11a3fac
 
Wow thanks digging, I was more familiar with cat, thus thinking of aliasing it. Never used less before, but I will try out your suggestion.