Shell script Implementation Status code analysis in Apache log _linux shell

First, the Apache log by day cutting Copy Code code as follows: Vi/etc/httpd/conf/httpd.conf ErrorLog "|rotatelogs/var/log/httpd/%y%m%derror_log 86400 480" Customlog "|rotatelogs/var/log/httpd/%y%m%daccess_log 86400" combined

Linux process monitoring shell script code _linux Shell

To ensure that the PHP page runs in the background, write a monitoring script, assuming that the program exits unexpectedly, you can automatically restart. Shell Script/usr/local/scripts/receve.sh content: #!/bin/bash #funtion: Keep

The shell script _linux shell that retains the specified number of files under Linux under the file system

The content of this section:Keep the specified number of files remaining under the file system Example: Copy Code code as follows: #!/bin/bash #------------------------------- #Description: Back Up your files #site: Www.jb51.net #--

Linux Faux write chmod command _linux Shell

Copy Code code as follows: #include #include #include #include int main (int argc,char **argv) { int mode; int Mode_u; int mode_g; int mode_o; Char *path; if (argc{ printf ("%s \n", argv[0]);; Exit (0); }

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

Shell script implementation quickly generate XML format sitemap instance share _linux Shell

Use the shell to quickly generate a sitemap map file in XML format, which is suitable for small and medium sized websites. In this case, a sitemap file with 12,053 URLs is generated and only spents 4.3 seconds! The shell code is as follows: Copy

Shell script to add the extension in batches two ways to share the _linux shell

Method 1: Copy Code code as follows: For file in ' ls '; Do MV $file $file. txt; Done Method 2: Copy Code code as follows: Find. -type f |xargs-i mv {} {}.txt There are some unsuccessful trials,

Single-machine traffic statistic function implemented by shell script _linux Shell

On the internet to see this single flow of the script, very good. Copy Code code as follows: #!/bin/sh Usage () { echo "Usage: $ [i INTERFACE] [-S INTERVAL] [-C COUNT]" Echo echo "-I INTERFACE" echo "The interface to monitor, and

4 ways for Shell to remove empty rows _linux shell

Sometimes when we process and view files, there are often a lot of empty lines, in order to be beautiful or need, it is necessary to remove these lines, the following methods: 1) with the TR command Copy Code code as follows: Cat

Shell script implementation automatically modifies IP address _linux shell

As a Linux SA, many parts of the day-to-day operation of the script, and the server's IP is generally static IP or Mac binding, of course, the latter is relatively cumbersome to operate, and the former we can set the host name, IP information,

A method of determining whether an input variable or an argument is null in a shell script _linux shell

1. Judging variables Copy Code code as follows: Read-p "Input a word:" Word if [!-n "$word"]; then echo "You have not input a word!" Else echo "The word you are $word" Fi 2. Judging input parameters Copy

SVN server startup and SVN server restart, stop, and other operations script sharing _linux Shell

svn

Copy Code code as follows: #!/bin/bash Case "$" in Start Svnserve-d-r/svndata Svnport= ' NETSTAT-NATP | grep Svnserve | Awk-f: ' {print $} ' | awk ' Nr==1 ' If [$svnport-eq 3690] Then echo "SVN Server already runnning. port:3690 " Else

Shell implements character encoding conversion tool sharing _linux shell

Copy Code code as follows: #!/bin/bash : Transcoding tool, support UTF-8 turn GBK and GBK to UTF-8Kong Lingfei @2012-05-07Mark #set-X Scode= "GBK"Dcode= "Utf-8" function Usage (){Cat Usage:conv [OPTIONS] [DIR][-u] GBK to UTF-8[-G] UTF-

3 ways the shell reads files by row _linux Shell

There are a lot of ways, and here are three ways to write: Writing a: Copy Code code as follows: #!/bin/bash While Read line Todo Echo $line Done Writing two: Copy Code code as follows: #!/bin/bash Cat

How to implement sudo command without input password using pipelines _linux shell

Because of the study of PHP, I also installed a XAMPP integrated environment package under Linux. But every time you start to enter the terminal, and then point Open/opt/lampp/, then sudo to perform manager-linux-x64.run operation, to open the XAMPP

Shell script View Nic Real-time traffic _linux shell

Copy Code code as follows: #!/bin/bash While ["1"] Todo Eth=$1 rxpre=$ (Cat/proc/net/dev | grep $eth | tr: "" | awk ' {print $} ') txpre=$ (Cat/proc/net/dev | grep $eth | tr: "" | awk ' {print $} ') Sleep 1 rxnext=$ (Cat/proc/net/dev |

Shell calculates average connection time function based on Web log _linux shell

Today on the Internet to see a web connection average time of the shell command, in their own machine tried, found that can not use, incredibly appear awk:fatal:division by zero attempted such a mistake, Mao's own changed the shell command.

Shell realizes automatic ADSL dialing and detects connection status script sharing _linux Shell

Today, my company colleagues to my entire ADSL automatic redial shell, and detect whether connected to, so as to ensure that the internal test server does not drop the net, OK, I sent the script below. System: CentOS 5.x Script 1: Copy Code

Gearman::xs installation method under CentOS _linux shell

This article describes the Gearman::xs in CentOS under the compiler installation method, for everyone to learn about! At present Gearman can support a variety of languages, its official website description is as follows: Language

Simple Linux lookup Backdoor idea and shell script sharing _linux Shell

Each process will have a PID, and each PID will have a corresponding directory under the/proc directory, which is the implementation of Linux (current kernel 2.6) system.General backdoor procedures, in the PS and other processes to see the tool can

Total Pages: 541 1 .... 316 317 318 319 320 .... 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.