Shell script code for backing up site content _linux Shell

Back up Web site content Copy Code code as follows: #!/bin/bash #指定运行的脚本shell #运行脚本要给用户执行权限 Bakdir=/backup Month= ' Date +%m ' day= ' Date +%d ' Year= ' Date +%y ' Hour= ' Date +%k ' min= ' Date +%m ' Dirname=

SSH expect script code for automatic login _linux Shell

ssh

Implementation: SSH remote login, each time to specify a bunch of user names and passwords, is required to implement automatic login.Login process: Local A first log in to B and then log on to the final C As follows: Copy Code code as follows:

Shell script Implementation Monitoring Iptables rule is modified _linux shell

Recently read an article through Nagios to realize MD5 real-time monitoring iptables status, I would like to see if the shell can also do monitoring iptables rule changes, after the experiment, there is the following script. System: CentOS 5.x

Shell Implementation TR Delete replacement detailed _linux shell

The TR (translate abbreviation) is used primarily to remove control characters from files or to convert characters. Syntax: TR [–c/d/s/t] [SET1] [SET2] #SET1: Character Set 1;set2: Character Set 2-c:complement, replace the characters except SET1

Shell script Implementation deletes a year ago file feature sharing _linux shell

Copy Code code as follows: #!/bin/bash #Description: Delete Files #===== defines the current year, the month, and the directory where the file resides =====# Currentyear= ' Date +%y ' Currentmonth= ' date +%m |awk-f ' 0 ' {print $} '

Shell script Bulk purge nginx cache _linux Shell

Foreword * With the development of the whole Internet, has produced numerous big and small website, along with the user to the website UI and the speed experience also is strengthening, to the enterprise or the individual, wins the user experience

Shell scripts traverse directories and bulk modify file encoding _linux Shell

When porting JSP pages on Windows to a Linux environment, it is too slow to find a transform encoding and modifying the default encoding type, write this script to attempt file traversal ~ Long time no write, Rusty. Copy Code code as

Shell create user and generate random password script share _linux shell

To create a random number method: Copy Code code as follows: 1~~~~ /dev/urandom In Linux, a device/dev/urandom is used to generate random sequence of numbers. Using this device we can generate random strings when needed.

The shell implements the "multithreading" Execution script file perfect solution _linux Shell

For example, I have 100 executable files, there is no special relationship between each other, such as code: Copy Code code as follows: Job_1 Job_2 Job_2 ..... job_100 Want to use Csh/bash to multithreading call

Two ways to encrypt shell scripts under CentOS _linux shell

The first method (Gzexe): This type of encryption is not a very safe method, but can satisfy the general encryption use, can conceal the password in the script and so on information.It is the use of the system's own Gzexe program, it is not only

Implement shell terminal code sharing (user login to implement system commands) _linux Shell

Copy Code code as follows: #include "apue.h" int userlogin (struct passwd); int main (){int ret,i=0;Long RET_CWD;struct passwd *pw;Char buf[128],hostname[16],usercwd[128];Char *ptmp1; do{ret = Userlogin (&PW);}while (ret!= 1); GetChar

Linux Modify directory and file permissions simple command to explain _linux shell

Problems encountered today, how a user such as WWW permissions replicated to my users? Permissions for the directory representation: dwrxr--r-- Where the first character d represents the directory,-representing the character w is writable, and R

Linux Get System Startup time sample detailed _linux shell

1. Preface Time is very important to the operating system, from the kernel level to the application layer, the time expression and precision of the same. The Linux kernel uses a constant named Jiffes to compute the timestamp. Application layer has

Ways to create Linux system services _linux Shell

Linux Environment: Ubuntu Copy Code code as follows: #! /bin/sh # Provides:server.sh # Default-start:2 3 4 5 # Short-description:server Testing ... Exec_path=/home/huangmin/cdev/project Exec=server

Linux command Details chkconfig command use method _linux Shell

Use syntax:chkconfig[--add][--del][--list][System Services] or Chkconfig[--level ][system Services][on/off/reset] Chkconfig Displays the usage when no parameters are running. If you add a service name, check to see if the service is starting at the

Shell script implements simple split string _linux shell

We have such a string: Copy Code code as follows: info= ' ABCD;EFGH ' Now to get ABCD and efgh, we can simply use the cut tool to get: Copy Code code as follows: Fstr= ' echo $info | cut-d \; -F 1 ' Sstr= ' echo $info |

The shell script implementation finds the last occurrence of a character in a string _linux shell

You need to find the last position of one of the characters in the string, which is available in PHP (Strrpos) or Perl (Rindex), and you can't think of a way out of the shell. Post on the Forum also no one answer (do not know whether the problem is

Shell script achieves precise cleanup squid cache _linux Shell

This script was modified on the Zhang Yi cache cleanup Script, the main is to add the IF option and optionally list the address of the cache file based on the parameter type (because it is not fixed, sometimes a particular JPG type, sometimes a

Three methods of shell kicking _linux shell

First Use W to view the current logged-in user, run the W command is the current user, need to keep, other all kicked off. Method One, the traditional way to find the names of other terminals, and then find the response process to kill Copy

Use Plink tool in Shell to implement remote batch shutdown _linux Shell

My operating system is centos6.4. Operating system: Rhel 6.2 x86_64 Download and install the Putty software package, I downloaded the putty-0.62-1.el6.rf.x86_64.rpmDownload the address below: HTTP://RPM.PBONE.NET/INDEX.PHP3 1. Remote Host IP

Total Pages: 541 1 .... 414 415 416 417 418 .... 541 Go to: GO

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.