Want to see the Linux traffic situation in real time, and do not want to go to the third-party tools, you can directly write footsteps run!System: CentOS 6.5Principle: Obtain the flow from the/proc/net/dev, and then by the conversion and divided by
Login shell (requires a password)
To log in normally through a terminal, you need to enter a user name and password.Using Su-usernameUsing su-l username
Non-login shell (no password required)
SU usernameOpen terminal window under
0. Internal variables in the shell:1. $?: Represents the return value of the shell command.2. $$: Represents the PID of the current shell.3. $!: The last PID value to be put into the background job.4. $ A: Indicates the name of the script.5. $1--$9,$
The test command in the shell is used to check if a condition is true, and it can be tested in three aspects of numeric, character, and file.
Numerical test
Parameters
Description
-eq
Equals is True
1. IntroductionHBase is a distributed, column-oriented, open-source database derived from a Google paper, BigTable: A distributed storage system of structured data. HBase is an open source implementation of Google BigTable, which leverages Hadoop
Shell Foundation-environment variable configuration fileSource configuration file or. Configuration file:After the environment variable is written to the configuration file, the user needs to re-login to take effect, but with the source command, it
One: Linux shell string interception and splicingSuppose there is a variable var=http://www.linuxidc.com/123.htm 1 # Intercept, delete the left character, and leave the right character. Echo ${var#*//}where Var is the variable name and the # is an
1. First, log on to the remote Linux server, such as 192.168.127.222, with the normal password login method;2. Click the Key Generation Wizard in the tool:650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/74/67/wKioL1YcmyPy22e-AAI3RPggo2A573
FunctionFunctions have the same functionality:Simply put, the function of the program is to call the same part of the code in a number of parts, and then a name, so the function is called the name can be, in the modification of the code, only need
1 Descriptionthis Shell script is the first generation of my written version of the Delta Code on-line script, now the code-on-line script has been updated several versions, focus on the technical focus is to visualize the code version of any
1 , describes the operation principle of shell program (can be attached with necessary graphical description);What is a shell?The shell acts as the shell of the operating system, providing the user with an interface to use the operating system. It
First, use '. ' Perform1. Contents of the file:a.sh#!/bin/sha=2echo a= $ab.sh#!/bin/sh./a.shecho a.sh:a= $a2. Add executable permissions# chmod +x a.sh b.sh3. Running#./b.sh a=2a.sh:a=It can be seen that a in b.sh does not get the A variable in a.sh,
/path/to/scriptname opt1 opt2 opt3 opt4 $0 $1 $2 $3 $4Is that clear enough for you? Run the script file named "$" variable, the first parameter is $ ~ ~ So, as long as we use in script, we can easily release some
Here are some of the shell's commonly used shortcut keys, shortcut keys to play familiar with to a certain extent, can improve productivity drops ... + a switch to command line start + e switch to command line end + L Clear Screen
Here's what you'll find useful after reading the third chapter of the Linux command line and Shell script programming encyclopedia.1./ETC/PASSWD file This file contains a list of all system user accounts and basic configuration information for each
Ftp-v-d-i-n-g [host name], where-V Displays all the response information for the remote server;-N Limit FTP automatic login, that is, do not use;. n etrc file;-d use debug mode;-G cancels the global file name.http://blog.itpub.net/20943428/viewspace-
最近在windows上编辑一些shell脚本后上传到交换机框体上后,这些shell脚本无法执行,每一行结尾都有‘^M‘,同时框体上又没有dos2unix工具,这么多脚本也不可能一行一行来修改,于是就自己写了一个脚本来把当前目录下所有文件中的‘^M‘去掉。#!/bin/shFilename=' ls ' forFinch ${filename}; Do if[- F ${f}]; Then Echo "Delete ' ^m ' and rename file to ${f}1
Environment variable configuration file for Shell programming,
I. Introduction1. Variable type:User-Defined variables (local variables)Environment variables: Define the operation environment for each user. The learned paths and ps1 are used. To
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