Basic working principle of Shell
The most important system program provided by Linux is the Shell command language interpreter. It does not belong to the kernel, but runs in user mode outside the core. Its basic function is to explain and execute
From the programmer's perspective, Shell itself is a program written in C language. From the user's perspective, Shell is a bridge between the user and the Linux operating system. You can enter commands for execution and use Shell script programming
Compile as script
The basic form of this script is from the rsync website. In fact, there is only one command:
Rsync-force-ignore-errors-delete-excluded-exclude-from = exclude_file-backup-dir = 'date + % Y-% m-% d'-av
Key parameters are:
-Backup:
There are two ways to assign values to an array variable:
(1) name = (value1... valuen) The subscript starts from 0.
(2) name [index] = value
Arrays are a form of organizing several variables of the same type in order to facilitate processing in
Recently, I learned the expect scripting language through mongoingshortct books. This scripting language is an extension of the tcl language and is used to solve the problem that some tools cannot automatically interact with each other. For example,
1. display the 10 processes that consume the most memory/CPU ps aux | sort-nk + 4 | tailps aux | sort-nk + 3 | tail2. view the processPs-e-o "% C: % p: % z: % a "| sort-k5-nr3. sort ps-e-o" % C: % p: % z by cpu utilization from large to small: % a "|
When running a job in Linux, you often encounter the following situations: a large number of jobs need to be run, and the time required to complete each job is not very long. if we run these jobs in serial mode, it may take a long time. If we run
Mail can be usedAlarm, you can also install an email reminder tool on your Android phone. If you are in trouble, you can use mobile Feixin, but the current smart phones are basically wcdma and cdma, there are few people around me who use mobile
The generated password and user input can be repeated.Therefore, it may be much more difficult to guess general rules.Current version rules:A -- number pair, location pairB -- after excluding the result of A, the number is correct, but the position
Components used to Query IP addresses
wget http://rfyiamcool.googlecode.com/files/nali-0.1.tar.gz
tar zxvf nali-0.1.tar.gz
cd nali-0.1
./configure && make && make install
The steps are similar to those of nginx, but the method for
Test the network connection status based on the running status of the daemon. This is far better than simply finding the network connection status parameters. The following uses a script to test the status of a specified process name and displays
Note: The following is an excerpt from the book "familiar with linux system security and optimization.1. system security record files# More/var/log/secureCount the IP addresses and times of access.# Grep-oP '(\ d + \.) {3} \ d +'/var/log/secure |
DDoS Deflate can prevent a small amount of DDoS and CC attacks, and it takes less time. We recommend that you use it.
1. Check whether iptables is running
service iptables status
If "iptables: Firewall is not running." is displayed, iptables is
Nowadays, the Internet is very insecure. Many people use some scanners to scan the ssh port and try to connect to the ssh port for brute-force cracking (brute-force scanning). Therefore, we recommend that you use the vps host space, set a complex
About partitions
If a potential hacker attempts to attack your Linux server, he will first try Buffer Overflow. In the past few years, buffer overflow is the most common form of security vulnerabilities. More seriously, the buffer overflow
Recently, in order to ensure security for the launch of the project, it is necessary to defend against DDOS and CC attacks and capital problems of the company. Now, O & M engineers are writing scripts for use, only simple defense
1. View IP
PHP security configuration in Linux is a complex process, which involves many detailed settings. A script is sent here, this script is used to check whether your PHP environment has security risks and reinforce your PHP environment.Function:
1.
You can use commands to view IP addresses that are too high for web connections, but you need to use AI to seal them. This is too troublesome. You can directly write a script to automatically resolve this issue. The web server uses nginx and python
Whether you are an ordinary Linux Desktop user or a system administrator managing multiple servers, you are faced with the same problem: an increasing number of threats. Linux is an open system that allows you to find many ready-made programs and
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