The command line can execute multiple commands at once, in the following ways:1. Separate each command;Note: The execution of each command will not affect the execution of other commands. In other words, each command executes,However, there is no
1. In the current directory, look for the files that were accessed within 20 minutes, and display the details of the file:Find./-name ' *.log '-mmin-20-exec ls-l {} \;Note: where {} is replaced by the file name, and the colon is used to indicate
1, dirs1) Functiondisplays all records in the current directory stack (the dirs command with no parameters displays the records in the current directory stack)2) Syntax(1) format: dirs [-CLPV] [+n] [-n](2) Options-C Delete all records in the
1. Get specific information from a string of stringsRequirement 1: Get the IP profile of the native IP:menu.lst as the system mirror, and need to obtain the native IP information from the file (get information from the files)1Timeout12 default 03 4
1). Background:During cluster deployment, consistent configuration and environment settings are required. for Virtual Machine clusters, you can copy, copy, and restore cluster machines by using images. different from physical machine clusters, if
I. Condition statements
1,
If [expression]
Then
# Code block
Fi
2,
If [expression]
Then
# Code block
Else
# Code block
Fi
3,
If [expression]
Then
# Code block
Else if [expression] # Replace this field with Elif [expression]
Then
# Code block
Else
#
Since HDFS is a distributed file system for data access, operations on HDFS are basic operations on the file system, such as file creation, modification, deletion, and modification permissions, folder creation, deletion, and renaming. Pair
HDFS
Echo-e "\ e [1; 31 m This is red text \ e [0 m"
\ E [1; 31 m set the color to red, \ e [0 m "will reset the color.
Each color has a corresponding color code, resetting 0, black 30, red 31, green 32, Blue 34, Magenta 35, cyan 36, white 37
To set
I. Regular Expression description
· Concept: Describe data with common attributes with a string of characters
· Note: when using regular expressions for matching, be sure to use the \ transfer symbol.
· Format:
A. grep [Option] 'regular expression'
Some linnux commands have very powerful functions, mainly because they support many Command Options. For example, the [IP] command can be used to configure and manage IP addresses and route entries. This command can complete all the functions
Convex hull diameter
Detailed description of convex hull diameter
// Calculate the convex hull diameter. Input convex hull Ch. The number of vertices is N, which is arranged counterclockwise. The square of the output diameter
Int rotating_calipers
Traditional if statements -- use conditional expressions as if conditionsIf [conditional expression]ThenCommandCommandCommandElseCommandCommandFiConditional expressionsFile expressionIf [-F file] If the file existsIf [-d...] If the directory
Start:The URL of svnis in excel. I copied it to txt.pdf, while VIOs only extracted the URL and saved it as url.txt.You can use VI to process url.txt, add SVN checkout, and other words to become the svn. Sh that can be run. Each row isSVN checkout.../
Part 1 simple common commands
1. Date command
2. Display calendar Cal
3. display the current directory pwd
4. Switch the current working directory
By default, the main directory of a Super User is/root, while that of a common user is the same
Preface:
Take notes on network-related knowledge, including IP address A/B/C classification, static address configuration/DNS configuration, and nic information viewing.
*) Division of A/B/C/D network addresses
IP address = network address + host
Single branch if statement
If condition; then statement1 statement2fi
Dual-branch if statement
If judgment condition; then statement1 statement2 ...... Else statement3 statement4 ...... Fi
Multi-branch if statement
If condition 1; then statement1
In the shell command terminal, Ctrl + n is equivalent to the downward direction key, and Ctrl + p is equivalent to the upward direction key.
You can use them or the arrow keys in the Command terminal to quickly find historical commands. This is
Time when the file is read
#! /Bin/bash
For file in 'ls/root'
Do
Stat $ file> 1.txt
Sed-n "7 p" 1.txt> 2.txt
Usetime = awk-F ":" '{print $2}' 2.txt
Echo "time =" $ file $ usetime
Done
The while statement that reads each row of a file.
Cat afile |
Loop Control Structure of shell script Programming
Loop Control-for Loop
Syntax 1
For Variable in List
Do
Commands
Done
Syntax structure 2
For Variable in List; do
Commands
Done
This List can be a List, variable, command, etc.
A for Loop provides an
I. Command Format
Gawk options program file
Gawk options:
-F fs specifies the file delimiter used to describe the data fields in a row
-F file: Specifies the file name of the reader.
-V var = value defines the variables and default values used
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