Shell parsing nginx Access log log

Statistics the most visited IP1. Tail-n 10000 Xxaccess_log | Cut-d ""-F 1 |sort|uniq-c|sort-rn|head-10 |more2.tail-n 10000 Xx-access_log | awk ' {print '} ' |sort|uniq-c|sort-rn|head-10 | MoreStatistics the most visited URLsTail-n 10000

4 ways to execute shell scripts in Linux summary

There are several ways to bash a shell script, assuming that the file name of the shell script we have written is hello.sh and that the file location is in the/data/shell directory and has execute permissions.Method One: Switch to the directory

CentOS boot automatically executes shell script to start Tomcat server

Sometimes it is necessary to start the project automatically after the start of the CentOS system, when the project is deployed in Tomcat, if the CentOS shutdown after the boot, the project has been stopped, and then need to be a manual to open each

Shell Scripting Exercises

#!/bin/bashecho "Current datetime is:" ' Date 'echo "Hello world!"#使用变量: You can use single or double quotation marksYour_name= "Wang"Echo $your _nameEcho ${your_name}Str= ' Shellstudy 'Echo ${str}#只读变量: Cannot change its valueMyurl=

Linux Learning _ssh (Secure Shell)

SSH (Secure Shell) is a set of remote operation of Linux and file upload and download software,Very useful, almost all Linux programmers in a software company will use SSH.Preparatory work:: Http://files.cnblogs.com/hongten/SSHSecureShellClient-3.2.9

Linux shell input and output

Echo-echo command can display a line or variable of text, or enter a string into the file string- E To resolve the escape character "nimenhao\ Nasfdsaf" printing occurs line -N-Carriage does not wrap in detail: Generally in the

[Boiled Water]-shell-xargs knowledge summary-Knowledge point

pipelines are implemented " The previous standard output is used as the following standard input "Xargs is to achieve " to use standard input as a parameter to a command "Contrast:Ind/sbin-perm +700 |ls-lFind/sbin-perm +700 |xargs ls-lParameters and

Linux--shell programming (programming syntax)

Directory Re-recognize variables Function Conditional statements Looping statements 1. Re-identification of variablesThere are 3 types of variables in the Shell: User variables, positional

Shell Script _ Start stop restart SH script

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 #!/bin/sh## java envexport JAVA_HOME=/usr/java/jdk1.7.0_79export JRE_HOME=$JAVA_HOME/jre## service name##

The basic knowledge of the 13th chapter before you learn shell scripts

1. Set the environment variable histsize so that it can save 10,000 command history.   vim/etc/profile   change histsize=1000 to histsize=10000 2. Why do I set PS1 (ps1= "[\[email protected]\h \w]\$")    display the results to be different from

A few common shell

As mentioned above, the shell is a scripting language, so there must be an interpreter to execute the scripts.The common shell scripting interpreters on Unix/linux include bash, sh, csh, Ksh, and so on, which are used to call them a shell. We often

function call path process analysis from Spark-shell to Sparkcontext (source code)

  No hurry, step-up, first lay a good foundationThe Spark Shell principle  First, we clearly locate the few.1, Spark-shell2, Spark-submit3, Spark-class4, Sparksubmit.scala5, Sparkiloop.scalaSource Code of InitializesparkDef Initializespark () {

Shell Script Raiders (learning notes)--1.5 to perform mathematical operations

Use Let, (()), or [] for basic integer operations, using expr and BC for advanced operations, including decimal operations.[Email protected] tmp]# str= [[email protected] tmp]# let str=str+6[email protected] tmp]# let str-=5echo $str11You can also

&& in Linux shell | | and ()

1. Introduction of the Linux command return valueWhen the shell executes a command, it has a return value that is stored in the shell variable $?. When $? is 0 o'clock, the command execution succeeds; when $ = 1 o'clock, the command execution fails.2

Shell branching and looping

1. Common environment variables variable name description example path finds a collection of paths for all external commands. If you do not have a PATH environment variable, all external

Shell scripts, the configuration file load order, and when to load.

In the Linux system, there are/ETC/PROFILE,/ETC/BASHRC, ~/.BASH_PROFILE,~/BASHRC these four configuration files, these files, will be automatically loaded at some point, that is, a little bit, usually are some aliases, special variables inside. Four

2 PowerShell and CMD and Unix/linux Shell

The previous article, I said, windows in order to change the user to its console interface, and then start from Windows Vista, plan to change this situation, so there isThe advent of PowerShell.1. Compatible Shell commandsTo be compatible with

Shell condition judgment

first, the numerical judgmentInt1-eq INT2 INT1 and INT2 two number equal true Int1-ne INT2 INT1 and INT2 two number of true int1-gt INT2 INT1 greater than INT1 for true int1-g e INT2 INT1 greater than or equal to INT2 trueInt1-lt INT2 INT1 Less than

Shell Script Instance

1. Analog Linnux Login Shell#/bin/bashecho-n "Login:" Read nameecho-n "password:" Read passwdif [$name = "CHT"-a $passwd = "abc"];thenecho "The Hos T and password is right! " else echo "Input is error!" Fi2. Compare two number sizes#/bin/bashecho

Create a DS13 server using Windows Power Shell

Create a DS13 server using Windows Power ShellThe Web page is created first:Virtual Cloud Service (ServiceName): Zampdmp-dsVirtual Network (vnetname): az-dmpnetworkTo create a new DS13, the attachment 800G Disk PowerShell command is as

Total Pages: 541 1 .... 198 199 200 201 202 .... 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.