Mission Requirements: Managing/USR/LOCAL/PHP7/SBIN/PHP-FPM-C in the simplest way/usr/local/php7/etc/php.ini This command includes starting a stop restartUsing technology: Shell Scripting Chkconfig Service ManagementImplementation process:1. Create a
I. Shell INTRODUCTIONThe shell is a command-line interpreter for Unix/linux, and a series of commands executed by the user in the shell are executed directly by the shell command-line interpreter. Modern, popular command-line interpretation features
Sort order:-F: ignore character case-N: Compare numeric Size-T: specify delimiter -K: Specify to compare field ordinals after delimited-u: duplicate rows, only once Sort by the second row of values:$ sort-k2n SORT.TXTCCC 8aaa 11yyy 12
1: What is Shell???
(1) The shell is an interface that the user interacts with the kernel, and the most popular shell is now called the Bash shell(2) The shell is also a programming language (3) A system can have more than one shell, you
Pipe symbol, UNIX is a very powerful feature, the symbol is a vertical line: "|".Usage: Command 1 | Command 2 His function is to pass the result of the first command 1 execution as input of the Command2 to command 2, for example: $ls-S|SORT-NR (Note
Using Prompt_command to implement the command audit function:Record what users, at what time, what to do, and then record the information found in a file.Specific operation:Append the following to/etc/profile:############ #日志审计chmod +s/usr/bin/chmod
The PS command in Linux is the abbreviation for process status. The PS command is used to list those processes that are currently running on the system. The PS command lists the current snapshots of those processes, which are those that are
In the first two articles, we have mastered some of the basic syntax of the shell, the use of variables, and the operation of basic data types. So this time we will learn the shell's structured commands, which are conditional selection statements
A string interception of Linux is useful. There are eight ways.Suppose there is a variable var=http://www.linuxidc.com/123.htm 1 # Intercept, delete the left character, and leave the right character. Echo ${var#*//}where Var is the variable name
(a) accept an input, judging is not a date, the user's input can be 2017-10-1 or 2017.10.1 or 2017/10/1The shell code is as follows#!/bin/bashRead-p "Input:" DateA= ' echo $date | Awk-f ' [./-] ' {print $ '/' $ '/' $ $} 'Date-d $a &>/dev/nullIf
Case 1: variables, functions, judgments, comparisonstest.sh[JavaScript]View PlainCopy
#!/bin/bash
Echo ======================== This is a bash demo========================
printf "%s is%d years old \ n" Zhengjinwei
DECLARE count=10
Title: There are many sub-directories and files in the/tmp directory of the Linux system. Write a program (Shell/perl/python or any other language) to find the file of the wildcard log.201710* and replace any lowercase ABC letters in the file with
The issue occurs in the background:There is a project through the IP to get the city needs of attribution, I was directly through the IP Attribution query interface of Sina to obtain. I'm using a shell script callresult=$ (curl-s '
The shell generates 100 6-bit random numbers in a number of ways:Here's a script that reads:650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M00/06/AF/wKiom1m8Ax-wV92tAAA8Jft99zI996.jpg-wh_500x0-wm_ 3-wmp_4-s_3612996601.jpg "title="
Requirements: FTP gets files for remote data, and downloads files according to the file's creation point in time. You can expand your own other requirements depending on the size of the file.Summary of Knowledge points:1, the time to obtain the file:
Shell The technique of text slicing inIn the shell there is also a string slice this thing exists, has been used in Python slices, the following record the use of slices in the shell.(1) , replacing some of the text in the variable contents$var = "
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.