morePage through text one screen at a time
more shows a file or command output one screenful at a time and waits for a key. It's the original Unix pager: simpler than less, mostly forward-only, and it quits at the end of the file. You'll meet it on minimal systems, rescue shells and BusyBox containers where less isn't installed.
more [OPTION]... FILE... COMMAND | moreYou need to read through a log that is longer than your screen on a box with only basic tools.
moreThe util-linux pager (BusyBox has its own smaller version).
more reads the terminal's size with the TIOCGWINSZ ioctl, prints one screen of lines, then puts the terminal into a raw-ish mode so it can read single key presses without Enter, and shows a --More-- prompt with a percentage (for files it knows the size of). Space shows the next screen, Enter the next line, / searches forward with a regular expression, and q quits. Moving backwards (b) only works for files, because a pipe can't be re-read; that limitation is the main reason less was written ('less is more'). When more reaches the end of the input it exits immediately and you're back at the prompt. If standard output is not a terminal (redirected or piped), more doesn't page at all: it behaves like cat, printing a :::::::::::::: header before each file when given several.
Space / EnterNext screen / next linebBack one screen (files only, not pipes)/pattern, nSearch forward, repeat search=Show the current line numbervOpen the file in an editor at the current lineqQuit+N / +/PATTERNStart at line N / at the first match-sSqueeze repeated blank linesUsing more to read a big log you'll need to scroll back throughmore only moves forward in pipes and exits at the end, so you can't go back up to an earlier line.
less file (back and forth, search both ways, follow mode)Pressing Ctrl+C or waiting to get out of moreq is the clean way out; more otherwise waits for a key indefinitely.
q (or Q)Expecting more in a script to pause for the userWhen stdout isn't a terminal, more behaves like cat and doesn't page.
In scripts, write to a file or use read -p to pause explicitlyTry these on a Linux machine of your own. Each task has a hint and a solution.
Page through ~/data/orders.csv with more, find out which line you're on after two screens, then quit.
Open ~/logs/app.log in more directly at the first line containing WARN.
Dump ~/data/servers.txt and ~/data/notes.txt with file name banners into ~/both.txt using more.
morePage through text one screen at a time
more shows a file or command output one screenful at a time and waits for a key. It's the original Unix pager: simpler than less, mostly forward-only, and it quits at the end of the file. You'll meet it on minimal systems, rescue shells and BusyBox containers where less isn't installed.
more [OPTION]... FILE... COMMAND | moreYou need to read through a log that is longer than your screen on a box with only basic tools.
moreThe util-linux pager (BusyBox has its own smaller version).
more reads the terminal's size with the TIOCGWINSZ ioctl, prints one screen of lines, then puts the terminal into a raw-ish mode so it can read single key presses without Enter, and shows a --More-- prompt with a percentage (for files it knows the size of). Space shows the next screen, Enter the next line, / searches forward with a regular expression, and q quits. Moving backwards (b) only works for files, because a pipe can't be re-read; that limitation is the main reason less was written ('less is more'). When more reaches the end of the input it exits immediately and you're back at the prompt. If standard output is not a terminal (redirected or piped), more doesn't page at all: it behaves like cat, printing a :::::::::::::: header before each file when given several.
Space / EnterNext screen / next linebBack one screen (files only, not pipes)/pattern, nSearch forward, repeat search=Show the current line numbervOpen the file in an editor at the current lineqQuit+N / +/PATTERNStart at line N / at the first match-sSqueeze repeated blank linesUsing more to read a big log you'll need to scroll back throughmore only moves forward in pipes and exits at the end, so you can't go back up to an earlier line.
less file (back and forth, search both ways, follow mode)Pressing Ctrl+C or waiting to get out of moreq is the clean way out; more otherwise waits for a key indefinitely.
q (or Q)Expecting more in a script to pause for the userWhen stdout isn't a terminal, more behaves like cat and doesn't page.
In scripts, write to a file or use read -p to pause explicitlyTry these on a Linux machine of your own. Each task has a hint and a solution.
Page through ~/data/orders.csv with more, find out which line you're on after two screens, then quit.
Open ~/logs/app.log in more directly at the first line containing WARN.
Dump ~/data/servers.txt and ~/data/notes.txt with file name banners into ~/both.txt using more.