Site icon LinuxCommands.site

more command tutorial in linux/unix with examples and use cases

linux more command – a filter for paging through text one screenful at a time.

The linux more command, usually used when browsing the contents of large files, can help us quickly flip through the text in split screens.

The current Ubuntu version (19.04) less is a program similar to more.

Syntax

more [options] file...

Options

Interactive Commands

Interactive commands for more are based on vi.

Examples & Use Cases

Display file contents starting at line X

Skip the file header and display the file contents from line 20

➜  ~ more +20 install.sh

Two consecutive blank lines are displayed as one blank line

➜  ~ more -s install.sh

Search for strings in files and display

➜  ~ more +/install install.sh

Use the more command to pipe through long content

➜  ~ cat install.sh | more

Exit mobile version