The phrase “Why use more
when less
has more?” is a fun way to highlight that less
is a more powerful and flexible pager than more
in Linux.
Differences Between more
and less
:
- Navigation:
more
: Only allows forward movement through a file, meaning you can’t scroll back.less
: Allows both forward and backward navigation, making it more versatile.
- Search Functionality:
more
: Supports searching (/pattern
), but it’s limited.less
: Supports more powerful searching, including navigating between matches withn
(next) andN
(previous).
- Performance:
more
: Loads the entire file before displaying, which can be slow for large files.less
: Works on demand, loading only portions of the file as needed, making it faster.
- Extra Features in
less
:- Supports horizontal scrolling (using arrow keys).
- Can open compressed files without needing to decompress them first.
- Allows jumping to specific lines (e.g.,
50g
jumps to line 50).
Why Use more
at All?
more
is an older, simpler tool and may be pre-installed by default in some systems whereless
isn’t available.- If you just need a quick, forward-only view of a small file,
more
might be sufficient.
But overall, less
is superior, and that’s why: “less
is more
!“