If memcached has been installed in Linux and is deployed to the/usr/local/memcached path, next we will begin to install service management scripts for it to start and stop.
First of all, through VI in the/ETC/RC.D/INIT.D path to create a new script
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
Lattice, as follows:
The code is as follows
Copy Code
[root@myvps1697 201407]# netstat-ntpl|grep sshd|grep-v grep |awk-f: ' {print $} '
In order to solve the problem of space, the 3 of my group have asked all
The code is as follows
Copy Code
#/bin/bash #Author Alex Fang. Updates may apply soon. Clear echo "Press AnyKey to continue ..." $anykey; Read AnyKeyecho "bbbbbbbbbbbaaaaaaaaaaaaaaaaaaaasssssssssssssssssshhhhhhhhhhhhhhhhhhhh!"echo
To view the script that the process occupies the swap partition
The command script is as follows:
The code is as follows
Copy Code
For i in ' Cd/proc;ls |grep "^[0-9]" |awk ' $ >100 ';d o awk '/swap:/{a=a+$2}end{print '
In determining the size of a value in addition to (()) can be used in the form of [] but can not use;, If statementif Judgment statement; ThenCommandFiIf,else statementsif Judgment statement; ThenCommandElseCommandFiIf Elif statementIf Judgment
Variable
Meaning
$
Gets the file name of the current execution shell script
$n
Arguments passed to the script or function. N is a number that represents the first few parameters. For example, the first
Shell Command CollectionCCat Zdd Browse the contents of a ZDD fileCat Zdd1 Zdd2 Browsing the contents of multiple filesCat-n ZDD Browse the contents of a file Zdd and display line numbersCD back to the start directory, that is, just logged into the
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,
Bash basic features: command line expansion~: Automatically expands to the user's home directory, or the specified user's home directory;{}: A comma-delimited list of paths can be hosted and can be expanded to multiple paths;For example:/tmp/{a,b}
[email protected] ~]# split [-BL] File PREFIXParameters:-B : Can be divided into the file size, can be added units, such as B, K, m, etc.;- L : Split by number of rows.Example:Example One: my/etc/termcap has more than 700 k, if want to divide into 30
Enter HBase command line./hbase ShellShow tables in HBaseListCreate a user table with info, data two column familiesCreate ' users ', ' info ', ' data 'You can also use the This command:Create ' users ', {NAME = ' info ', VERSIONS = ' 3 '}Insert
Write a script, create a folder, enter a folder, and then use the loop to create a sequential file in the folderIdea: 1. Create the specified folder and go to the folder2. Specify a variable with a value of 0 to allow this variable to be recycled3.
First, define the array variable1. Grammar(1) arrayname= (parameter1 parameter2 ...)Example 1, define an array named name, with a value of Claire,obama,georgeName= (Claire Obama )(2) Arrayname= (Parameter1Parameter2...)Again we change example 1 to
First, demonstrate the effect of rebound shell0. Look at the Python version650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M02/8B/90/wKioL1hRTinAlo_nAAASu8q0u_A128.jpg "title=" Python.jpg "style=" Float:none; "alt="
At work, you sometimes need to compare whether the files are consistent. You can use the following script (relatively simple): share it and hope to help friends who have the same requirements ~ The code is as follows:Copy code #! /Bin/bash#
By default, Nginx access logs are stored in a file. After a long time, the log content becomes unusually large. It is not conducive to archiving, backup, and analysis of log files. You can run scripts on a daily basis to automatically cut logs 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