commands immediately executed and returned you to the command line, less is an
application that will continue to run and occupy the screen until you exit.
We will open the /etc/services file, which is a configuration file that contains service
information that the system knows about:
less /etc/services
The file will be opened in less, allowing you to see the portion of the document that fits
in the area of the terminal window:
# Network services, Internet style
#
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, officially ports have two entries
# even if the protocol doesn't support UDP operations.
#
# Updated from http://www.iana.org/assignments/port-numbers and other
# sources like http://www.freebsd.org/cgi/cvsweb.cgi/src/etc/services .
# New ports will be added on request if they have been officially assigned
# by IANA and used in the real-world or are needed by a debian package.
# If you need a huge list of used numbers please install the nmap package.
tcpmux 1/tcp # TCP port service multiplexer
echo 7/tcp
. . .
To scroll, you can use the up and down arrow keys on your keyboard. To page down
one whole screens-worth of information, you can use either the space bar, the "Page
Down" button on your keyboard, or the CTRL-f shortcut.
To scroll back up, you can use either the "Page Up" button, or the CTRL-b keyboard
shortcut.
To search for some text in the document, you can type a forward slash "/" followed by
the search term. For instance, to search for "mail", we would type:
/mail
This will search forward through the document and stop at the first result. To get to
another result, you can type the lower-case n key: