Why has the behavior of the `more` command changed?


I just upgraded to Fedora 36 and it seems the more command has changed. On Fedora 35 (and prior) the command “more /etc/fedora-release” would display “Fedora release nn (xxx)” and then the $ prompt:

 $ more /etc/fedora-release
 Fedora release 35 (Thirty Five)

On Fedora 35 it displays a full page with many blank lines an EOF at the bottom and it requires a Q to get back to the $ prompt:

 $ more /etc/fedora-release
 Fedora release 36 (Thirty Six)

 (END) (enter q)

Worse is that if I use the -s option, the more command hangs:

 $more /etc/fedora-release -s
 Fedora release 36 (Thirty Six)

It does not respond to a break/interrupt . I have to close/kill the “more” process to get back to the $ prompt.

Is there any fix for the more command?

1 Like

The more command is designed to produce a page (screen) of data from a file at a time, and allows paging down to see the data at the users pace for reading.

AFAIK it has always used ‘enter’ to page down and ‘q’ to quit. I am not an expert with more since the more advanced command ‘less’ allows moving both up and down within the displayed info and has been my go-to for many many years. ‘less’ allows navigating with enter, up & down arrows, and paging with page up & page down.

Both use the ‘q’ to exit the displayed info.


I see that more has the option -e that does:

       -e, --exit-on-eof
           Exit on End-Of-File, enabled by default if not executed on terminal.

The version in F35 is 2.37.4 and in F36+ it’s 2.38+:


The changelog for 2.38 says:

  • POSIX compliance patch preventing exit on EOF without -e [Ian Jones]

So, the default behaviour seems to have changed (corrected for POSIX compliance).

The F35 behaviour would be replicated using more -e .... You can use an alias to always call it with -e by adding this to your ~/.bashrc if you’re using bash:

alias more="more -e"

I’m not seeing this on my Fedora 37 here, but it’s a patch version ahead of F36 from the looks of it. Let’s start with some info: what version of the package are you using?

which more
rpm -qf /usr/bin/more

I think you mean 36 here?

As far as the original question. Can ‘more’ be reverted to the form where an output of less than a page return to a command prompt.
Very easily.
edit ~/.bashrc and add a line alias more="more -e"

This command $more /etc/fedora-release -s is invalid since it places the -s option after the file name, not before, thus is trying to find a file named ‘-s’. This is likely the cause of needing to use the ctrl-C. When I use more with 2 different file names it displays the first file and waits for an exit of that file before it will display the second.

$ more -e -s /etc/fedora-release /etc/os-release 
Fedora release 37 (Thirty Seven)
NAME="Fedora Linux"
VERSION="37 (Workstation Edition)"
PRETTY_NAME="Fedora Linux 37 (Workstation Edition)"
VARIANT="Workstation Edition"

Although there are no blank lines in the second file to ‘squeeze’ the -e exited as soon as the last file was displayed in full and the -s worked with no errors.

Here is the version of the package

$ rpm -qf /usr/bin/more

You are correct , I did mean Fedora 36 with regards to displaying blank lines.

more -e does give me the behaviour that I am used to ie no EOF unless there is nore than one page of information.

When I use more on RedHat or AIX or any Fedora prior to Fedora 36, it would not fill the screen with blank lines and display EOF and expect a q to quit one a one line file. If there is more than one page/screen of information in the file then it shows “–More–(2%)” and awaits input( shows one more line and space shows the next page/screen. When you get to bottom it ends without displaying EOF and expecting a q to quit 0- ie in all my past experience with the more command it seemed to run as if the -e option had been included.

Seems quite likely that there was an alias created at some point so that a command line ‘more’ actually was aliased and executed as ‘more -e’. Some how that alias may have been removed, but the desired effect may easily be restored by creating your own alias as noted above.

If you were to run cat ~/.bashrc do you see aliases listed there?
If you run alias do you see a list of aliases that are in effect for you? (I have 15 - 20 aliases listed)
It is quite common for users to have an alias for a command so that commonly used options are automatically added.