50. Linux shell commands, netstat, Traceroute

1. netstat 1) netstat [Option] Parameter descriptions related to routing: ①-R: lists the route tables. The function is similar to the route command; ②-N: The Host Name and service name are not used. The IP address and port number are used,

Shell if expressions

1. Shell expression A = 3; B = 2; C = 4 If (A> B) & (A Or If [[$ A> $ B] & [[$ A Or If [$ A-GT $ B-A $ A-lt $ C] 2.-O = or,-A = And, but I have always used | or && 3. Other explanations -Ne comparison number (numberic );! =

Several shell commands

1,! $ Is a special environment variable, which represents the last string of the previous command. For example, you may: You can change it: $ Mkdir mydir $ MV! $ Yourdir#$ MV mydir yourdir $ CD! $  2. ^ old ^ new Replace some strings in

Shell scripts can quickly obtain a parameter in the access log.

For example, if we count Sid, the access log is as follows: 203.142.196.181--[07/Jan/2009: 06: 02: 58 + 0900] "Get/AD/queryphp. jsp? V = 1.5 & Ct = i02 & TOS = A & Key = % 3f % 3f % 3f & SID = 100575311 & ENC = sjis HTTP/1.0 "200 944"-"" {KDDI-SN3B

Unix shell mathematical computing commands

1.Use the value assignment statement:Format:LetValue assignment expression【Tip] The Value assignment expression can be omitted as follows:((Value assignment expression))Example: Give the independent variableIAdd1Let I = I + 1Or(I = I + 1) -----------

Linux Shell sends emails with attachments

If there is no body file, use echo to directly extract the body, for example: Echo "this is content" | mutt-s "this is subject"-A/path/Yourfile abc@local.domain-C bbb@local.domain If there is a body file, use CAT/path/contentfile | mutt-s "this

Shell notes (2)

> Array Names = (max Helen Sam Zach) Names [*] extracts all data and returns it as an element. Names [@] Retrieves all data, but returns an array, which can be used to assign values to the array. > Export Make the variables of the parent

GUI Design in dialog shell replaces complicated libncurses Programming

Original article link   Cutting-edge In the past, I wanted to write a bash-like GUI interface, so I had to use the libncurses library in C. I thought it was annoying. With the dialog tool, you canProgramInUse shell script to complete

My little turtle is about to change the shell!

My family originally had two turtles, one father and one mother. I brought them back from Qingdao. When I bought them, I asked the stall owner what to eat. The stall owner replied: it is best to use a dedicated feed, said to take out a box of

Get the current IP address in Shell

Reference address: The information returned by ifconfig includes the IP address, but it is troublesome to obtain the current IP address in shell. Obtain Method The formats of ifconfig returned information vary in different systems:[1] Linux:

Common Linux Shell skills (1)

1. Special files:/Dev/null and/dev/tty Linux provides two special files that are very useful for shell programming:/dev/null and/dev/tty. /Dev/null will discard all data written into it. In other words, when Program When writing data to this file,

Shell condition limit

Conditional Criterion Just talk about 『Program", Then the conditional criterion, that is, the criterion" If then ", must be learned! Because in many cases, we have to determine how the program should proceed based on certain data. If... then

Shell script)

What is shell scripts? What is shell script (ProgramScripts? Literally, we divide it into two parts. In the "shell" section, we have mentioned in bash that it is a tool interface that allows us to communicate with the system under a text interface.

47. Linux Shell and LN links

1. Create multiple entries or access points for the same file. 1) hard link: both the original file name and the connection file name point to the same physical address, that is, the original file and the hard connection file are the same file

Shell script code for linux server security reinforcement

Copy codeThe Code is as follows :#! /Bin/sh # Desc: setup linux system security # Author: corzd # Powered by www.freebsdsystem.org # Version 0.1.2 written by 2011.05.03 # Account setup Passwd-l xfsPasswd-l newsPasswd-l nscdPasswd-l

Use SharpShell to quickly implement Windows Shell Extension

After the CLR in-process side-by-side feature is introduced in. NET 4, we can use C # To compile Windows Shell. We can find related examples In Microsoft's All-In-One Code Framework. There are also several articles about it In the yard: Windows

Summary of code for automatically uploading and downloading ftp using Shell scripts in Linux

1. ftp automatically logs in to batch download files. Copy codeThe Code is as follows: ##### migrate/home/data from the ftp server to the local/home/databackup #### #! /Bin/bash Ftp-n Open 192.168.1.171 User guest

Shell array common instance sharing

Note: The subscript of the array in shell starts from 0 by default. 1. Place the string in an array to obtain its length. Copy codeThe Code is as follows :#! /Bin/bash Str = "a B -- n d" Array = ($ str) Length =$ {# array [@]} Echo $ length For (I

Introduction to shell for loop and Array application

Read a file, assign each row to an array variable, and print it out in a for loop. Copy codeThe Code is as follows :#! /Bin/sh I = 1 SUM = 'sed-n' $ = 'tmp.txt '# calculates the total number of lines in the file. Echo "$ SUM" While read line

Shell code to prevent ARP attacks

Copy codeThe Code is as follows :#! /Bin/bash Declare gw = 'route-n | grep-e' ^ 0.0.0.0'' Declare gwname = 'echo $ gw | grep-oe '\ w * $'' Declare gwip = 'echo $ gw | grep-oe '[0-9] \ {2, 3 \}\. [0-9] \ {1, 3 \}\. [0-9] \ {1, 3 \}\. [0-9] \ {1, 3 \}'

Total Pages: 541 1 .... 329 330 331 332 333 .... 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.