Windows
Linux
File Management
File System
Windows more equivalent in Linux
Displays large text files one screen at a time, allowing you to scroll up and down.
Windows
→
more
Linux equivalents
less
less
less
Overview
What this command does
Displays large text files one screen at a time, allowing you to scroll up and down.
Migration tip:
less is better than more because you can scroll both forwards AND backwards. The name is a joke: 'less is more than more'. Press q to quit, / to search.Practical tasks
Common use cases
Page through large files
Displays large text files one screen at a time, allowing you to scroll up and down.
less file.txt
Open file for paging
/ pattern
Search forward inside less
? pattern
Search backward inside less
Ready to run
Copyable Linux commands
Review paths, device names, package names and permissions before running any command.
less bigfile.txt
less /var/log/syslog
ps aux | less
grep -r "error" . | less
Walkthrough
Examples with explanations
# Windows: more bigfile.txt
less bigfile.txt # open file (scroll with arrows)
less /var/log/syslog # great for reading log files
# Pipe output into less:
ps aux | less # scroll through long output
grep -r "error" . | less
# Inside less: press / then type to search
Reference
Common options and variations
| Command or option | Use |
|---|---|
less file.txt | Open file for paging |
/ pattern | Search forward inside less |
? pattern | Search backward inside less |
n / N | Jump to next / previous match |
G | Jump to end of file |
g | Jump to beginning of file |
q | Quit less |
Distro differences
Debian/Ubuntu vs Fedora vs Arch
This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.
| Distribution | Package manager / base | Equivalent command | Difference to notice |
|---|---|---|---|
| Debian/Ubuntu | same command | less |
Same command on this distribution. |
| Fedora | same command | less |
Same command on this distribution. |
| Arch | same command | less |
Same command on this distribution. |
Keep learning