•        OS : openKylin-0.7.5-x86_64
  •        blog : 师万物

wc -l 统计文本的行数

root@sww:/etc# cat rsyslog.conf | wc
     59     154    1382

root@sww:/etc# cat rsyslog.conf | wc -l
59

root@sww:/etc# cat rsyslog.conf -n
     1	# /etc/rsyslog.conf configuration file for rsyslog
     2	#
     3	# For more information install rsyslog-doc and see
     4	# /usr/share/doc/rsyslog-doc/html/configuration/index.html
     5	#
     6	# Default logging rules can be found in /etc/rsyslog.d/50-default.conf
     7	
     8	
     9	#################
    10	#### MODULES ####
    11	#################
    12	
    13	module(load="imuxsock") # provides support for local system logging
    14	#module(load="immark")  # provides --MARK-- message capability
    15	
    16	# provides UDP syslog reception
    17	#module(load="imudp")
    18	#input(type="imudp" port="514")
    19	
    20	# provides TCP syslog reception
    21	#module(load="imtcp")
    22	#input(type="imtcp" port="514")
    23	
    24	# provides kernel logging support and enable non-kernel klog messages
    25	module(load="imklog" permitnonkernelfacility="on")
    26	
    27	###########################
    28	#### GLOBAL DIRECTIVES ####
    29	###########################
    30	
    31	#
    32	# Use traditional timestamp format.
    33	# To enable high precision timestamps, comment out the following line.
    34	#
    35	$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat
    36	
    37	# Filter duplicated messages
    38	$RepeatedMsgReduction on
    39	
    40	#
    41	# Set the default permissions for all log files.
    42	#
    43	$FileOwner syslog
    44	$FileGroup adm
    45	$FileCreateMode 0640
    46	$DirCreateMode 0755
    47	$Umask 0022
    48	$PrivDropToUser syslog
    49	$PrivDropToGroup syslog
    50	
    51	#
    52	# Where to place spool and state files
    53	#
    54	$WorkDirectory /var/spool/rsyslog
    55	
    56	#
    57	# Include all config files in /etc/rsyslog.d/
    58	#
    59	$IncludeConfig /etc/rsyslog.d/*.conf

学习资源


感恩曾经帮助过 师万物 的同学们。