Write a SHELL script to implement high HA of the Nginx service process. The script content is as follows :#! /Bin/bashwhile: donginxpid = 'ps-Cnginx -- no-header | wc-l' if [$ nginxpid-eq0]; then/usr/local/nginx/sbin/nginxsleep5
Write SHELL scripts
Original by Bai Qiao: Visual C ++ is not the only C ++ compiler-general Linux technology-Linux programming and kernel information. For details, see the following. C ++, as a high-level language, must compile the source program to convert it into a
Shell string truncation rules: & #8226; $ {# parameter} Get the string length & #8226; $ {parameter % word} to the minimum extent, extract word from the back & #8226; $ {parameter % word} captures word & #8226; $ {parameter # word} at the backend to
Introduce Process Control in Shell, such as judgment statements... If statement: first, learn a few knowledge: [-f "somefile"]: Determine whether a file is [-x "/bin/ls"]: determine whether/bin/ls exists and has the executable permission [-n "$ var"]
Run the Shell command in the pipeline to obtain the system running data: 1. output the five most memory-occupied commands in the current system: #1) run the ps command to list all processes running on the current host. #2) The fifth field is sorted (
The reason for DHCP Service Startup failure-Linux general technology-Linux technology and application information. For details, refer to the following section. Service dhcpd restart (that is,/etc/rc. d/init. d/dhcpd start) faild and faild is used to
ZendStudio7.0.0 was officially released-general Linux technology-Linux programming and kernel information. The following is a detailed description. An award-winning professional PHP integrated development environment with powerful professional
How to install Win8RTM for NONBOOT on a hard disk-general Linux technology-Linux technology and application information. For details, refer to the following section. After downloading the Win8 RTM file, the leaked version of Win8 is NONBOOT, so the
Loop Control-for Loop syntax structure 1 forVariableinListdocommands & nb
Loop Control-for Loop
Syntax 1
For Variable in List
Do
Commands
Done
Syntax structure 2
For Variable in List; do
Commands
Done
This List can be a List, variable, command, etc.
Federa starts to fix the problem. Urgent: Linux general technology-Linux technology and application information. The following is a detailed description. I have installed fedora16 from the hard disk and deleted the 10 Gb partition used to install
This script was modified on the cache cleanup script of Zhang banquet, mainly to add the if option, and select the address of the cached file based on the $1 parameter type (because $1 is not fixed, sometimes it is a specific jpg type, sometimes it
Linux schedules tasks and automatically deletes old files n days ago. linux is a system that can automatically generate files, such as logs, emails, and backups. Although hard disks are cheap now, we can have a lot of hard disk space to waste these
Shc can be used to perform binary encryption on shell scripts The following describes how to install and use: Install: Take shc-3.8.7.tgz as an example tar-vxfshc-3.8.7.tgzcdshc-3.8.7maketestmakestringsmakeexpirationmakeinstallmakeinstall-c-ss
Shc
File SEARCH Command find: The following shows the main application example of the find command:/& gt; ls-l # list the test files contained in the current directory-rw-r --. 1rootroot48217Nov1200
File SEARCH Command find:The following is an example
Solve the Problem of garbled Chinese characters in the txt files stored in windows in ubuntu-general Linux technology-Linux technology and application information. The following is a detailed description. The solution is as follows:
【
After ubuntu
1. First, cut apache logs by day vi/etc/httpd/conf/httpd. confErrorLog & quot; | rotatelogs/var/log/httpd/% Y % m % derror_log864001_& quot;
1. First, cut apache logs by day
Vi/etc/httpd/conf/httpd. confErrorLog "| rotatelogs/var/log/httpd/% Y % m %
Yum source settings-general Linux technology-Linux technology and application information. For more information, see. $ Yum update
Plugin "product-id" can't be imported
Plugin "subrole-manager" can't be imported
Loaded plugins: refresh-packagekit
#! /Bin/basffe [$ 1-gt $2] thenecho & quot; $1 & gt; $2 & quot; elseecho & quot; $2 & gt; $1 & quot; fi # Number judgment commands #-gt is greater than meaning #-lt is less than #-eq is equal to #-ne is not equal to #-ge is greater than or equal to #
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.