less
Opposite of more; view file content paginated
Overview
Allows backward movement in the file as well as forward movement. Less does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like vi.
Syntax
less [OPTION]... [FILE]...Common Options
-N, --LINE-NUMBERSCauses a line number to be displayed at the beginning of each line in the display.
-S, --chop-long-linesCauses lines longer than the screen width to be chopped (truncated) rather than wrapped.
-i, --ignore-caseCase-insensitive searching. The search ignores case by default if the pattern contains no uppercase letters.
-M, --LONG-PROMPTCauses less to prompt more verbosely than usual, showing the percentage into the file.
+<number>Start at the specified line number.
+/<pattern>Start at the first occurrence of pattern in the file.
-X, --no-initDisables sending the termcap initialization and deinitialization strings to the terminal.
-F, --quit-if-one-screenCauses less to automatically exit if the entire file can be displayed on the first screen.
Examples
View the system log using less.
View logfile.txt with line numbers.
Open error.log and jump to line 100.
Open access.log and jump to the first occurrence of 'ERROR'.
Pipe the output of ls -l into less for paginated viewing.
View kernel ring buffer messages using less.