IMPORTANT
The more command acts like cat whenever it can. The only way to force more into interactive mode is to make your terminal smaller than the number of lines in the file being displayed.
Incidentally, this means that it’s impossible to send commands to more when using it to display a one-line file.
An editor can be invoked from more using v
; by default this tries to invoke $VISUAL
, and then $EDITOR
, and then just Vi before giving up.
If more can be run with NOPASSWD via sudo, then an admin shell can be achieved by using !
to invoke a command (!/bin/bash
, etc.). Note, however, that this is just executing $SHELL -c $COMMAND
, which can fail if $SHELL
is set to something exotic in /etc/passwd.
INFO
Exotic shells in /etc/passwd can also cause commands executed via ssh to fail for the same reason.