Linux shell script one-click Installation Ngrok

Recently, to the internal network for debugging and access, bought 3 peanuts can only map 6 ports, is not enough to meet the needs, just have a friend to me said Ngrok can also be carried through the intranet, research for a few days, light

Array usage in shell scripts in Linux

In the shell (I'm bash here) there is no traditional "data type", and the values stored in any variable are "strings" of characters. Of course, you can declare a variable to be an integral type, an array, and so on by declare. Among them, the array

Introduction to the use of shell scripts in lamp environment installation

cd/lamp/libxml2-2.6.30./configure--prefix=/usr/local/libxml2/MakeMake installcd/lamp/libmcrypt-2.5.8./configure--prefix=/usr/local/libmcrypt/MakeMake installCd/lamp/libmcrypt-2.5.8/libltdl./configure--enable-ltdl-installMakeMake installcd/lamp/zlib-1

Linux shell command to overwrite entire disk with small files

Suppose we are confronted with a problem like this, the company's key data copy to the test server, after it is deleted directly, still worry that the server vendor can restore it, even through Fdisk reformatting, there is still the risk of recovery,

Linux in the shell for loop implementation Read File wrapping

I. Issues and needs: For example, there is a aa.list file that reads: 1 2 3 4A B c D For script reads a file, I want to read in one row, read one row at a time, like the first time is 1 2 3 4, the second is a B c DBut I wrote this. For I in "$

The shell for what? While and until contrast

Finally, came to the Shell 13 ask the last question ... Long Breath ~ ~ ~ ~ ~ The last thing to introduce is a common "loop" in shell script design. The so-called loop is the code in the script that repeats itself under certain conditions. The

Shell script statistics in Linux page traffic in Apache log

Requirements: There are two pages in the program for a purpose, and now you need to count the number of visits per minute between the two pages, including total hits, number of successes (status code 200), and number of failures. Then write to MySQL.

Shell String Lookup Replace regular operation

Examples of string operations in workFilename= '/home/admin/jobs/cnclickstat/dfsloader/loader.cfg '#下面是使用shell字符串操作buname1=${filename#*/jobs/} #去除 '/home/admin/jobs/cnclickstat/dfsloader/loader.cfg ' prefix get ' CnClickstat/DFSLoader/ Loader.cfg

Linux Shell automatic filter site attack Source IP

The specific script content is as follows: The code is as follows Copy Code $ vim/home/rainbow/sbin/block_attack_ips.sh #!/bin/bash Logfile=/webserver/blog/logs/rainbow_access.log function Check_root () {If [$EUID-ne 0];

Shell to find query file operation instance

Example 1 Typical operation, traversing all JS in the directory and using Yuicompressor compression The code is as follows Copy Code For i in ' Find Asset/v2-name ' *.js ';Todoecho "Compress $i"Java-jar

Sqlmap combined with Meterpreter to realize injected infiltration return to shell

Build a Php+mysql platform, the range for DVWA, set the SQL injection range level of low (easy to test use).Enter 1 in the Submit box, grab the package with Burp, copy the package data to the Cookies.txt document, and drag to the Kali

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

Bash Shell programming Exercises

1. Create the executable file t2.sh and print "Hello world!"[Email protected] ~~ $ cd tscripts/'#!/bin/bash' >>' echo "Hello world!" ' >>~/tscripts $ chmod +x *~/tscripts $./t2.sh Helloworld!2. Methods to run the executable file in 3[Email

Shell implementation Arithmetic Simple method

When you just learned to write shell batches, there is no need to base your logic operations on the basics: arithmetic, here's a simple implementation method in the Linux shell.1. Simple method$ b=$ ((5*5+5-3/2))$ echo $b29In the Linux shell, we can

Bash Shell programming Exercises

Original file:Find/etc-name passwd 2>&1 | Tee Ee.log1. Cat-n The document contents of the E.log with the line number and enter E2.log in this document:[Email protected] ~/t2scripts $ cat-n E.log |Tee E2.log1/etc/passwd2 3 4Find:

Install Zsh's shell under Mac to replace the original bash

ZshThe Mac system comes with zsh, which is generally not the latest version, and can be installed by Homebrew if requiredBrew Install Zshzsh --versionversion of Zsh can be viewed by commandUse echo $ZSH_VERSION the command to view the ZSH version

echo Display content color in shell script

echo Display in shell script with color display, echo display with color, need to use parameter-EThe format is as follows:For example:Where 41 of the position represents the background, 36 of the position is the color of the wordNote:1, the word

Detailed logging of the user, IP address, Shell command, and detailed operation time of the login process

Add the following code to the/etc/profile#historyUSER_IP=`W.H.O.-U am I2>/dev/NULL|awk '{print $NF}'|sed-E's/[()]//g'' Histdir=/usr/share/. Historyif[ -z $USER _ip] Thenuser_ip=`hostname`fiif[ ! -D $HISTDIR] Thenmkdir-P $HISTDIRchmod 777$HISTDIRfiif[

SSH service and peanut shell domain name analysis

First, the installation instructions for the CentOS 5 example1, install the necessary development kits [[email protected] ~]# yum install gcc gcc-c++ autoconf automake2. Download phddns-2.0.2.16556.tar.gz to a directory [[email protected] ~]# wget

Two methods of Shell/. sh script encryption in centos linux (shc and gzexe)

Shc methodShc is a tool for encrypting shell scripts. It converts shell scripts into executable binary files.Automated maintenance of the system using shell scripts is simple, convenient, and portable.However, shell scripts can be read and written,

Total Pages: 541 1 .... 220 221 222 223 224 .... 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.