However, if you add a user, this shell. Users is enough. In this case, net.exe and ADSI are deleted, which may be a new method for adding users.
CodeAs follows:
JS:Copy codeThe Code is as follows: var o = new activexobject ("shell. Users ");Z =
The Shell script is mainly used to initialize the new Linux server system, including:
Disable IPv6 ModuleDisable SELinuxShow vim colorsSet system language EncodingOptimize system servicesKernel Parameter optimization.It can be modified according to
Copy codeThe Code is as follows: # include
Using namespace std;
Void ShellQin (int A [], int n)
{
Int gap = n/2;
Int I, j;
For (; gap> 0; gap = gap/2) // set the initial gap, group by gap, and decrease by gap/2
{
// After the gap is set, insert and
Shell script:
1 ,#! Shell for Script Execution2. # comment3. Command or syntax structureEcho "input content"Empty line output by echo
Run:
1. shell scriptSh example2. Grant shell script execution permissionChmod u + x example
Case: example sysinfo.
This e-mail alert script is widely used. Many of the sendmail and postfix scripts are used, and some of them are used in perl's NET: SMTP and Authen: SASL modules, but I am not using perl well. I always send some inexplicable emails (such as if (a> 1
1. Methods of raw violence
Copy codeThe Code is as follows: myLinux:/home/zhanhailiang/public_html # killall nginx
2. gentle approachFind the pid of the specified process and kill | kill-USR1
Copy codeThe Code is as follows:
1. print some header informationCommand ............Dilimiter
Use the content in the demarcation symbol dilimiter as the standard input of the commandIt is often used in echo commands, which avoids the use of an echo command when no line is output,
1. define the shell function (define function)
Syntax:[Function] funname [()]{Action;[Return int;]}Note:1. It can be defined with function fun () or fun () without any parameters.2. If the parameter is returned, the value "+: return" is displayed.
Copy the files in the bill folder to the bill1 and bill2 folders according to certain rules (file name parity.Update the progress tag of bill1 and bill2 (Update file. max)File3 is the label of the latest file under the bill directory. It is updated
The color of the text terminal can be generated using an ANSI unconventional character sequence. Example:
Echo-e "\ 033 [44; 37; 5 m ME \ 033 [0 m COOL"
The above command sets the background to blue, foreground white, blinking cursor, output
Ctrl + a switch to the command line
Ctrl + e switch to the end of the command line
Ctrl + l clear screen content
Ctrl + u clear the content before cutting the cursor
Ctrl + k cut the content after clearing the cursor
Ctrl + y copy the content
When writing a Shell filter process, most people use grep to search for the specified process in the output result of ps aux. However, the grep process is also displayed, for example, the pptpd process, two matching items are displayed:
Copy
First script file
Copy codeThe Code is as follows :#! /Bin/bash
Echo "This is my first bash code! "
Exit 0
Redirection symbols and mathematical computationCopy codeThe Code is as follows :#! /Bin/bashEcho-n "The time and date are :"DateValue1 = 100 #
1. Example of an error method
A)
Var = 1 + 1
Echo $ var
The output result is 1 + 1. Tragedy.
B)Var = 1Var = $ var + 1Echo $ varThe output result is 1 + 1, which is still tragic.
2. Correct Method1) Use letVar = 1Let "var + = 1"Echo $ varThe output
If you are an IT person who is used to Windows command prompt, when you use Linux Command lines for the first time, you will feel at a loss. The DOS command you are familiar with does not exist in Linux. There are a lot of commands to remember
Introduction:
In the production environment, the application service generates fixed log files by date every day. Developers often need O & M personnel to provide these application logs, sometimes for a single day, sometimes for a period of time,
Assume that the same Command needs to be executed on multiple nodes (considering the uncertainty of the command). Generally, the for loop is used and the command can be directly called through ssh. For example, you need to view the root directory
1. Output inbound Steering
In UNIX, each process has three special file descriptor standard inputs.(Standard input), standard output, and standardError ). The three normally accept terminal input, which is displayed by terminal. HoweverUNIX provides
Sometimes you need to configure a static IP address for the server or something and you do not know that the IP address is not occupied. In this case, it is very convenient to use this script.# Cat arping#! /Bin/bashIPaddr = 192.168.0.IPFILE
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