WC: View File Statistics usage: $ WC filename1. $ WC fileName$ WC FileNameX Y Z/desktop/helloX: Indicates the number of rowsY: Indicates the number of wordsZ: Indicates the number of bytes/desktop/hello: Indicates file name2. $ wc-l FileName-l
Create multiple user groups and users, set up candidate groups, default shellgroupadd-g 40000 adminuser specify GIDUseradd natasha-g adminuser Specify a subordinate group[Email protected]/]# Useradd Harry-gadminuser[Email protected]/]# Useradd sarah-
Purpose: Self-collation, self-review, self-reflection!Content: Dry Goods! Dry!! Dry!!!Attach: The shortcomings of the hope that you correct, can give like me rookie a little inspiration is the best. Just the inspiration ...Thank you: Thank the old
Hardware Chapter
CPU-related
Lscpu #查看的是cpu的统计信息. Cat/proc/cpuinfo #查看CPU信息详细信息, such as the model of each CPU, frequency, etc.
Memory-related
Free-m #概要查看内存情况 The unit here is
String test:= =: Determine string equality! =: Judge strings are not equal-N: Tests whether the specified string is empty-S: Tests whether the specified string is not emptyLoop statement:for variable in list; DoLoop bodyDoneExample:For I in 1 2 3 4 5
The shell is also called the command line interface, which is the interface between the user and the computer under the *nix operating system. The word shell refers to the program in the operating system that provides access to the kernel
1. Using the DATE-D optionDate + "%y%m%d"-D "+n days" today's post N day datesDate + "%y%m%d"-D "-N days" today's top N Day dates2. Common date formatPython
[[email protected] tmp] # date + "%F"
--
[[email protected] tmp] # date + "%d"
///
Use the awk command to combine two lines of the same name in the following two files.A file:Han Hailin 21 years oldHailin Korea 23 years oldHan Linhai 22 years oldLin Hai Han 24 years oldB File:Han Linhai MaleHailin Han NanHan Hailin MaleLinhai Han
Linux scripting is not too strong, and recently tutorial, after all, Linux shell in the daily work is still very common,It is more convenient to use, save time and effort.Here are the study notes, partial theory, followed by a few examples for
The Magical magic of awk:Extract the number 600 and note the special effect of the + sign.echo "Fuck 600ms" |awk ' {print + $NF} 'Result: Other characters are filtered, leaving only the number 600Using If,for in Commad mode#测试ifa=200if [$a = =];then
Medium brackets [
and the test command equivalent, the user Boolean judgment, such as:1 a='abc'2if'abc' ] 3 Then 4 " Yes " 5 Else 6 " No " 7 FiEquivalent to1 if ' ABC ' 2 Then 3 " Yes " 4 Else 5 " No " 6 FiWhen using [], be
1. Piping and redirectionFile descriptor 0: standard input for a programFile descriptor 1: Standard outputFile descriptor 2: standard error output> Operator: Redirects the standard output to a file.>> operator: Attaches the output to a file.|
Write a script:1, create a function, can accept two parameters:1) The first parameter is a URL, you can download the file, the second parameter is a directory, that is, the location of the download after the save;2) If the user-given directory does
Automatic installation:Of course, if you trust this open source project author, you can try to use the automatic installation method.
wget Https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh-O-| Sh
Manual Installation:1.
* Wildcard #注释 \ escape Character | Pipe character $ variable character; command delimiter!! Executes the previous command!$ the last parameter of the previous command ~ home directory & Command Background execution> correct override redirect >>
The Shell has three kinds of if ... else statements:1.if. FI statement;2.if ... else ... fi statement;3.if. Elif ... else .... fi statement.If ... fi statementSyntax for the IF ... else statement:if [Expression] Then If Truefi Note: There must
S Shell Learning Note v1.0table of Contents
1. What's shell
2. Hello World Program
2.1. SRC
2.2. Add run Privilege
2.3. Run shell
3. variables in Shell
3.1. System
1, SETP1Turn on the NTP protocol and modify the time zone:/system NTP Client set Enabled=yes server-dns-names=1.centos.pool.ntp.org/system clock set time-zone-name=asia/ ShanghaiDetects if the route communicates with the dynamic Domain name
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