less の前身である more はページを送る機能しかありませんでしたが、
改良版の less はページを戻ったり、圧縮ファイルを展開しながら表示したり、
文字列検索を行ったりと飛躍的に強力になっています。
/usr/share/man/man1/ls.1.gz を more で参照した例
従来このような用途には more が使われていましたが、機能拡張が進んだ less 普及しています。
コマンド 意味 <SPACE>, ^V, f, ^F 1画面ページを送る(進める)。 d, ^D 1/2画面分送る <Enter>, ^N, j, ^J 1行送る y, ^Y, k, ^K 1行戻る u, ^U 1/2画面分戻る b, ^B 1画面分ページを戻る。 1G 先頭に戻る G 末尾に移動 h ヘルプの表示 q 終了
[student@h006 ~]$ zcat /usr/share/man/man1/ls.1.gz | more
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.43.3.
.TH LS "1" "April 2018" "GNU coreutils 8.22" "User Commands"
.SH NAME
ls \- list directory contents
.SH SYNOPSIS
.B ls
[\fIOPTION\fR]... [\fIFILE\fR]...
.SH DESCRIPTION
.\" Add any additional description here
.PP
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of \fB\-cftuvSUX\fR nor \fB\-\-sort\fR is sp
ecified.
.PP
Mandatory arguments to long options are mandatory for short options too.
.TP
\fB\-a\fR, \fB\-\-all\fR
do not ignore entries starting with .
.TP
\fB\-A\fR, \fB\-\-almost\-all\fR
do not list implied . and ..
.TP
\fB\-\-author\fR
--続ける--
# passwd(5) の先頭5行を表示
[student@h006 ~]$ head -n5 /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/sbin/nologin
daemon:x:2:2:daemon:/sbin:/sbin/nologin
adm:x:3:4:adm:/var/adm:/sbin/nologin
lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
[student@h006 ~]$ head -3 /etc/group
root:x:0:
bin:x:1:
daemon:x:2:
# passwd(5)の後ろから3行を表示
[student@h006 ~]$ tail -3 /etc/passwd
gluster:x:988:982:GlusterFS daemons:/var/run/gluster:/sbin/nologin
named:x:25:25:Named:/var/named:/sbin/nologin
apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin
# ログファイルを表示しつづける
[student@h006 ~]$ tail -f /var/log/dmesg
[ 23.089932] device-mapper: table: 253:2: adding target device sda2 caused an alignment inconsistency: physical_block_size=4096, logical_block_size=512, alignment_offset=0, start=113246720
[ 23.451856] XFS (sda1): Mounting V5 Filesystem
[ 24.235995] XFS (dm-2): Mounting V5 Filesystem
Copyright 2007-2018 ycosSystems GettingStart/Body243.html