Today, when deployed in Jenkins, because developers frequently submitted code, resulting in Jenkins shell script in that frequent deployment, in order to prevent such problems, a special search to prevent the recurrence of code. Here's a look at the
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
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
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
Recently the World Cup has come, has been busy between work and the World Cup, there is no time to manage my blog, today can only be the whole simple small shell to everyone. The company asked to delete one months before the backup file, so that the
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 '
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
Variable Description:$$The shell itself PID (ProcessID)$!The PID of the Shell's last running background process$?End code of the last command to run (return value)$-Flag list using the SET command$*A list of all parameters. Output all parameters in
Problem Description:
CentOS A new user, log in after the information of the shell script is as follows:
Linux CentOS Shell display-bash-4.1$ does not display the user name path solution
Ps: If you mistakenly delete files in the user directory, it
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#
Nginx log access. log is not separated, and access records are always recorded in this file. For a long time, log query and file system are not good, so segmentation is required.Vim/data/scripts/cut_nginx_log.sh #! /Bin/bash# Auto-run this
1. Added the shell script vi/etc/rc. d/init. d/nginx. The code is as follows:Copy code #! /Bin/bash# Chkconfig: 35 85 15# Description: Nginx is an HTTP (S) server, HTTP (S) reverseSet-ePATH
Replacing File content in Centos in batchesThese two Angels used the locomotive to collect some data because they generated a lot of SQL files. I want to replace the fixed content in each SQL file with another content.Manual file configuration
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
A few commandsThe script is based on the preceding log format. If your log format is different, you need to adjust the parameters following the awk.Analyze the UserAgent in the log The code is as follows:Copy code Cat access_20130704.log | awk-F
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