It was discovered today when I browsed the service port in/etc/services with less. In the less view of the file can actually enter the VI mode to edit the original file. After testing, more also has the same function. I searched for Baidu and Google as if no one had discovered and published this content. In the future we can use less to browse the file and then modify it will be better?
I hope that the linuxer can be shared with Chinese students.
If there is anything wrong, please understand. can also accept light spray!
Here for the convenience of watching me show the line number, you can see that the lower left corner shows that the file name ' services ' is in the browse phase.
[Email protected] tmp]# less-n Services
1 #/etc/services:
2 # $Id: services,v 1.48 2009/11/11 14:32:31 Ovasik EXP $
3 #
4 # Network Services, Internet style
5 # IANA Services Version:last updated 2009-11-10
4 A
7 # Note that it's presently the policy of IANA to assign a single WELL-KN 7 own
8 # port number for both TCP and UDP; Hence, most entries here has a 8 ent ries
9 # Even if the protocol doesn ' t support UDP operations.
Ten # Updated from RFC 1700, ' Assigned Numbers ' (October 1994). Not all PO ten RTS
# is included, only the more common ones.
12 #
The latest IANA port assignments can be gotten from
# http://www.iana.org/assignments/port-numbers
The well known Ports is those from 0 through 1023.
Registered Ports is those from 1024x768 through 49151
# the Dynamic and/or Private Ports is those from 49152 through 65535
18 #
Describes one service, and is of the form:
20 #
# service-name Port/protocol [aliases ...] [# Comment]
22
Services
Here Press V to enter the VI mode, the left bottom of the total number of rows. As follows:
#/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's presently the policy of IANA to assign a single well-known
# port number for both TCP and UDP; Hence, most entries here has a entries
# Even if the protocol doesn ' t support UDP operations.
# Updated from RFC 1700, ' Assigned Numbers ' (October 1994). Not all ports
# is 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 is those from 0 through 1023.
# The registered Ports is those from 1024x768 through 49151
# the Dynamic and/or Private Ports is 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
Tcpmux 1/UDP # TCP Port Service multiplexer
Rje 5/tcp # Remote Job Entry
"Services" 10774L, 641020C
20 lines is a blank line, I add characters in this line, save exit to see if the source file has been modified.
3 #
4 # Network Services, Internet style
5 # IANA Services Version:last updated 2009-11-10
6 #
7 # Note that it's presently the policy of IANA to assign a single well-kn own
8 # port number for both TCP and UDP; Hence, most of entries here has both Ent Ries
9 # Even if the protocol doesn ' t support UDP operations.
Ten # Updated from RFC 1700, ' Assigned Numbers ' (October 1994). Not all PO RTS
# is included, only the more common ones.
12 #
The latest IANA port assignments can be gotten from
# http://www.iana.org/assignments/port-numbers
The well known Ports is those from 0 through 1023.
Registered Ports is those from 1024x768 through 49151
# the Dynamic and/or Private Ports is those from 49152 through 65535
18 #
Describes one service, and is of the form:
# I am Here,this is a test line.
# service-name Port/protocol [aliases ...] [# Comment]
22
Tcpmux 1/tcp # TCP port service Multip lexer
--INSERT--
Use VI to enter the file view. The file has indeed been modified!
[Email protected] tmp]# VIM Services
1 #/etc/services:
2 # $Id: services,v 1.48 2009/11/11 14:32:31 Ovasik EXP $
3 #
4 # Network Services, Internet style
5 # IANA Services Version:last updated 2009-11-10
6 #
7 # Note that it's presently the policy of IANA to assign a single Well-know n
8 # port number for both TCP and UDP; Hence, most entries here has a Entri es
9 # Even if the protocol doesn ' t support UDP operations.
Ten # Updated from RFC 1700, ' Assigned Numbers ' (October 1994). Not all Port s
# is included, only the more common ones.
12 #
The latest IANA port assignments can be gotten from
# http://www.iana.org/assignments/port-numbers
The well known Ports is those from 0 through 1023.
Registered Ports is those from 1024x768 through 49151
# the Dynamic and/or Private Ports is those from 49152 through 65535
18 #
Describes one service, and is of the form:
# I am Here,this is a test line.
# service-name Port/protocol [aliases ...] [# Comment]
22
: Set Nu
This article is from the "Mud" blog, be sure to keep this source http://niba666.blog.51cto.com/9238216/1868191
More and less edit modes