どうも、ゼウス・ラーニングパワー 講師Xこと鯨井貴博 です
lessコマンド
-------
lessコマンドは、1画面に収まらないほど長いファイルを、
1画面ずつ表示することが出来るコマンドです。
キーボードの「Enter」で1行進む、「Space」で1画面進むことが出来ます。
先日紹介したmoreとの違いとしては、
キーボードの「↑」、「↓」などで上下に進む・戻るということが
可能となっております。
実行結果
-------
[root@ForXWindow ‾]# cat -b /etc/services
.
.
.
.
.
.
10740 bacnet 47808/tcp # Building Automation and Control Networks
10741 bacnet 47808/udp # Building Automation and Control Networks
10742 nimcontroller 48000/tcp # Nimbus Controller
10743 nimcontroller 48000/udp # Nimbus Controller
10744 nimspooler 48001/tcp # Nimbus Spooler
10745 nimspooler 48001/udp # Nimbus Spooler
10746 nimhub 48002/tcp # Nimbus Hub
10747 nimhub 48002/udp # Nimbus Hub
10748 nimgtw 48003/tcp # Nimbus Gateway
10749 nimgtw 48003/udp # Nimbus Gateway
10750 3gpp-cbsp 48049/tcp # 3GPP Cell Broadcast Service Protocol
10751 isnetserv 48128/tcp # Image Systems Network Services
10752 isnetserv 48128/udp # Image Systems Network Services
10753 blp5 48129/tcp # Bloomberg locator
10754 blp5 48129/udp # Bloomberg locator
10755 com-bardac-dw 48556/tcp # com-bardac-dw
10756 com-bardac-dw 48556/udp # com-bardac-dw
10757 iqobject 48619/tcp # iqobject
10758 iqobject 48619/udp # iqobject
⇒出力が長すぎて、ファイルの始めから確認出来ない。
[root@ForXWindow ‾]# less /etc/services
# /etc/services:
# $Id: services,v 1.48 2009/11/11 14:32:31 ovasik Exp $
#
# Network services, Internet style
# IANA services version: last updated 2009-11-10
#
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, most entries here have two entries
# even if the protocol doesn't support UDP operations.
# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports
# are included, only the more common ones.
#
# The latest IANA port assignments can be gotten from
# http://www.iana.org/assignments/port-numbers
# The Well Known Ports are those from 0 through 1023.
# The Registered Ports are those from 1024 through 49151
# The Dynamic and/or Private Ports are those from 49152 through 65535
#
# Each line describes one service, and is of the form:
#
# service-name port/protocol [aliases ...] [# comment]
tcpmux 1/tcp # TCP port service multiplexer
/etc/services

lessコマンド
-------
lessコマンドは、1画面に収まらないほど長いファイルを、
1画面ずつ表示することが出来るコマンドです。
キーボードの「Enter」で1行進む、「Space」で1画面進むことが出来ます。
先日紹介したmoreとの違いとしては、
キーボードの「↑」、「↓」などで上下に進む・戻るということが
可能となっております。
実行結果
-------
[root@ForXWindow ‾]# cat -b /etc/services
.
.
.
.
.
.
10740 bacnet 47808/tcp # Building Automation and Control Networks
10741 bacnet 47808/udp # Building Automation and Control Networks
10742 nimcontroller 48000/tcp # Nimbus Controller
10743 nimcontroller 48000/udp # Nimbus Controller
10744 nimspooler 48001/tcp # Nimbus Spooler
10745 nimspooler 48001/udp # Nimbus Spooler
10746 nimhub 48002/tcp # Nimbus Hub
10747 nimhub 48002/udp # Nimbus Hub
10748 nimgtw 48003/tcp # Nimbus Gateway
10749 nimgtw 48003/udp # Nimbus Gateway
10750 3gpp-cbsp 48049/tcp # 3GPP Cell Broadcast Service Protocol
10751 isnetserv 48128/tcp # Image Systems Network Services
10752 isnetserv 48128/udp # Image Systems Network Services
10753 blp5 48129/tcp # Bloomberg locator
10754 blp5 48129/udp # Bloomberg locator
10755 com-bardac-dw 48556/tcp # com-bardac-dw
10756 com-bardac-dw 48556/udp # com-bardac-dw
10757 iqobject 48619/tcp # iqobject
10758 iqobject 48619/udp # iqobject
⇒出力が長すぎて、ファイルの始めから確認出来ない。
[root@ForXWindow ‾]# less /etc/services
# /etc/services:
# $Id: services,v 1.48 2009/11/11 14:32:31 ovasik Exp $
#
# Network services, Internet style
# IANA services version: last updated 2009-11-10
#
# Note that it is presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; hence, most entries here have two entries
# even if the protocol doesn't support UDP operations.
# Updated from RFC 1700, ``Assigned Numbers'' (October 1994). Not all ports
# are included, only the more common ones.
#
# The latest IANA port assignments can be gotten from
# http://www.iana.org/assignments/port-numbers
# The Well Known Ports are those from 0 through 1023.
# The Registered Ports are those from 1024 through 49151
# The Dynamic and/or Private Ports are those from 49152 through 65535
#
# Each line describes one service, and is of the form:
#
# service-name port/protocol [aliases ...] [# comment]
tcpmux 1/tcp # TCP port service multiplexer
/etc/services