The Linux sed tool is very powerful and can be easily implemented to add content to the first or last line of a keyword. This feature was used today in bulk modifying tomcat logs.
Add content to the first or last line of a lineThe following actions
For users who use the awk command, it is convenient to use comparison operators to filter text and strings when working with numbers or strings in a line of text.
In this section of the Awk series, we'll explore how to use comparison operators to
First, the phenomenon of problems
Now network has two virtual machine host 95% CPU in idle state, memory usage is not particularly high, and the host load average reached more than 40.
Second, the problem analysis
Linux-dash is a lightweight web-based monitoring panel designed for Linux. This program displays a variety of system properties in real time, such as CPU load, RAM usage, disk usage, speed, network connectivity, RX/TX bandwidth, logged-in users,
We compile files in a Linux VPS often have a variety of errors, there is no relationship between the error, basically the general use of the user problems in the online basic can find the answer. For example, last night left when trying to compile
Their own Linux server time and PC time is not very right, log time is not good, not easy to tune information judgment, so need to sync the Linux server time and their Windows time, the two are consistent, only convenient mode of view.
Add WebDAV support for Nginx
In compiling nginx know there is a "–with-http_dav_module" of such a parameter, but really let me have to actually be used for this feature, say something surprisingly – solve the problem of cotton using Android phone
. Find the contents of a file in a batch, for example:
# grep-rn "Text to find".
2. Find and replace the contents of the file in bulk.
# sed-i "s/the text to find/replace text/g" ' Grep-rl "to find text"./'
other uses of SED are as follows:
1,
Now the management of Linux has been very few people use Telnet, the basic use of CRT, Xshell or putty. Because the next need to speak Zabbix-free client monitoring only Telnet, through Telnet to monitor server performance.Yum Install TelnetYum
Top command: TopThe display is as follows:The three values after the load average are 1 minutes, 5 minutes, and 15 minutes of load. The data is checked for an active number of processes every 5 seconds and then calculated from that number. If this
Install iptables Firewall
If you do not install iptables you need to install first, CentOS execution:
Yum Install IptablesDebian/ubuntu Execution:
Apt-get Install Iptables
Clear existing Iptables rule
Iptables-fIptables-xIptables-z
Open the
The FINDMNT command is used to find the mounted file system. It is used to list installation devices and can be mounted or unloaded when needed, which is part of the Util-linux package.
Install FindmntThe FINDMNT command comes from the Util-linux
Linux nginx log split by day instanceNginx Log has a small disadvantage, the log file has always been one, will not be automatically cut, if the traffic is very large, will cause the log file is very large, not easy to manageThat's what we need to
Deploying the Unison bidirectional Synchronization Service in CentOS 6.5
Deploying the Unison bidirectional Synchronization Service in CentOS 6.5
Environment Introduction:
ServerIPServer1192.168.30.131Server2192.168.30.1321. Add host mutual trust:A.
CentOS installation to PDF and SWF Environments
Centos7 install libreoffice + unoconv + swftools
1. Set yum Source
Note:
A. You have set up 192.168.4.217
B. CentOS7 image CentOS-7-x86_64-Minimal-1503-01.iso
C. You must set the IP address during
Network settings of CentOS in virtual machines
In a virtual machine, you want to reconfigure the network of the virtual machine as the bridge mode and assignIP address and other resources. Several commands are required.
First, set the network
Centos make install package installation casePrepare the written c file
1. ws. h [header file, declare function name, not implemented] 2. wso. c [contains the function body. To implement the function, you need to compile it into a dynamic link
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service