Due to work needs, often to connect the mobile phone and use the ADB to do some operations, found that the shell function is very good, but in castration state, the most obvious one is, the implementation of a number of commands, the directory
I wrote one of these posts before, but because Ecvps went bankrupt, so I lost two months of data, that article was lost, but I also updated the script method, there will be content generation key chain and no content automatically randomly generated
Words do not say, start on the code, in order to lazy, the code is just a screenshot, interested friends can read after their own write, so deepen the impression.
Above is the shell script written by the younger brother. Please forgive me
The code is as follows
The code is as follows
Copy Code
[Root@client01 ~]# Cat/etc/init.d/resind#!/bin/sh#created by Teddylu at 2014-12-12#used to startup for resin version 3.1#chkconfig: 345 85 15#set up environment
Awk is a very powerful text analysis tool in Linux. In a nutshell, awk reads the file line by row, dividing each row into separate sections with whitespace as the default separator, and then doing a variety of analytical processing.
Basic usage of
When using a virtual host before, look at the Web site run log, found a lot of abnormal malicious access. At that time because they do not have the system permissions can not be able to screen these actions. Now have their own cloud host, front-end
Method start
Check out the current shell
The code is as follows
Copy Code
[Phpbird@host3 ~]$ Echo $SHELL/usr/local/bin/bash
Of course, this is modified.Modify the default shell to modify the/etc/passwd
Simply put, the shell is a file containing several lines of shell or Linux commands. For a large number of commands that are written and used more than once, you can save them using a separate file,For later use. Typically, shell scripts are
Turn from:Shell Several methods for judging string inclusion relationshipsNow every time you analyze the site log, you need to determine whether Baidu Spider is a real spider, after nslookup need to determine if the result contains "Baidu" stringThe
When using Jenkins for integrated deployment, when we deploy the generated war packages, we often need to make some backups or suspend the operation of the server, which can be executed directly in Jenkins.1, first install the plug-in SSH Plugin 2
Processing RequestsclassTestControllerextendscontroller{ Public functioninit () {if(!Yii_env_dev) { Throw NewExitexception (201, ' can not access not ' in dev mode '); } } /** * */ Public functionActionclientip ()
Why do scripts use the./+ script name to execute the scriptUnderstand:Because if the script name is used directly, then the Linux system will go to path path to findsuch as go to/bin usr/bin, such as find, this time will not find the script name,
Shell script Programming:Classification of programming languages: depending on how they are runCompile-and-run: Source code--compiler (compile)---Program files;Explanation Run: Source code-and run-time start interpreter, run by interpreter side
2. character intercept commands2.1 Cut field Fetch command (grep fetch row, cut fetch column )(1) Cut command:#cut [options] File nameOption:-F Column Number: Extract the first few columns;-D delimiter: Splits columns by the specified delimiter,
4. Bash 's variables4.1 user-defined variables4.1.1 What is a variableA variable is a memory unit of a computer where the stored value can be changed. When a shell script needs to save some information, such as a file name or a number, it is stored
Let's give you a detailed analysis of the Illustrator software.Tutorial sharing:In the Ai software, create a 800*800 document, select the elliptical tool, and draw an elliptical image, as shown in the figure. Then, select the pen tool, check the
Example 1,Cut nginx logs by date and automatically delete logs generated seven days ago (logs have been synchronized to dedicated log storage servers, so you can safely delete historical logs .)#! /Bin/bash# InitializationLOGS_PATH =/data/nginx/logs/
In the production environment, hosts may be modified by another administrator or user. allow allows more ip addresses to log on to machines. To facilitate unified management, you can change the allow and deny files to the default settings when
After using thin or rbenv, many friends found that rails could not be started happily with linux startup.Remember the following points:1. Make the PATH contain the rbenv PATH2. Check the/var/logs/boot. log file during debugging.The specific process
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.