As we all know, Shell is the main management tool under Linux operating system. In addition to mastering the commands under the shell, the system administrator also needs to master some special characters. These special characters can help your
I. Introduction to the ConceptNetwork programs are divided into server-side programs and client programs. The service side is the one that provides the service, and the client is the party requesting the service. But the reality is that some
Function: Copies the specified input file to the specified output file, and can be converted to format during the copy process. You can use this command to realize the function of the diskcopy command under DOS. First use the DD command to write the
It took 1 days to write a script to detect whether an IP network is unblocked, but to detect whether the network is unblocked is easy to implement, but it is not good to add some restrictions.
Copy Code code as follows:
#!/bin/bash
######
Let's get to the point. The company now has 2 servers, are CentOS systems, a local (LAN), a computer in the telecommunications room. Because the work needs, the daily backup room data to the local, has been FTP login, and then downloaded to the
Shell regular Expressions and grep awk find sed sort uniq cut
One, grep
1, basic parameters
GREP-[ACINV] ' search content string ' filename
-A text file search
-C calculates the number of matched rows found
-I ignores case
-N to output the
This article mainly describes the shell script in the execution of SQL statements 5 ways to operate MySQL, this article explains the SQL statement embedded directly into the shell script file, the command line calls a separate SQL file, using the
Installation of the zsh bodyFirst chsh -l , look at the current bash situation, as follows: If it is CentOS, use yum install -y zsh to install ZSH, zsh and then installed oh my zsh , using the Wget method to install wget
Method 1:These two days in the camera Bringup, need to add chromatic file, because there is too much to replace the contents of the file, manually change the file configuration a bit less practical, so Google a bit, to find a good way to replace the
Shell programming often involves the calculation of numerical values, and sometimes it is easy to forget or confuse the scenarios for these calculation commands, which is a summary of commonly used calculations. The main include let, BC, expr, (())
1. Gets the return value of the Shell function call:#!/bin/sh info () { cat jlb.sh} res= ' info ' echo ' state: ' $?echo ' res: ' ${res}description : res='info' This behavior calls function info, inside the symbol ' is not a single argument,
1. load the configuration file sequence during the Linux login process:/etc/profile→/etc/profile.d/*.sh→~/.bash_profile →~/. BASHRC →[/ETC/BASHRC]You can view the default ~/.BASHRC file as follows:[Root@~/wade/codereview/redis-2.8.17Cat ~#. BASHRC #
1. Cron Service "Ubuntu environment"
2. Crontab usage
3. Edit the Crontab file
4. Process examples
5. Several examples
In Linux, periodic tasks are typically handled by the Cron daemon . Cron reads one or more configuration files that
#!/bin/bash ## description: the script function, cycle in weeks; Friday full backup, Saturday No backup, Sunday to Thursday differential backup;# due to work needs, do not implement compression packaging method, using CP full backup,
The security and stability of the server is the goal that every operation and maintenance want to achieve, after all, once the website traffic is big, access is high, there will be some boring people to attack, to help detect the vulnerability is
Arithmetic operations are undoubtedly very important in shell scripting programming;The command to perform an integer arithmetic operation in bash is let, which has the syntax format:Let Arg ...Arg is a complete arithmetic expression consisting of a
Ubuntu does not have the SSH (Secure Shell) service installed by default, and if you want to link to Ubuntu via SSH, we need to install ssh-server manually.SSH sub-client ssh-client, server Ssh-server.1. Determine if the server is installing SSH
1) How do I use parameters in a script?First parameter: $ $, second argument: $ AExample: The script will copy the file (arg1) to the destination address (ARG2)./copy.sh file1.txt/tmp/Cat copy.sh#!/bin/bashcp $1 $22) How to calculate the parameters
1. ShellFor a computer, its hardware is controlled by the kernel of the system, the user wants to control the computer, it must have the means to communicate with the system core. The shell is one of the means by which the user communicates with the
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