Recently turned to a "bird brother's Linux private dishes." This is a basic book, lofty high-rise floor, will not much but can learn. This is a few of my knowledge points, although very basic. Hope to share with you.
10th Chapter VIM program editor
Key instructions:
/Word looks down for a string called word
? Word looks up for a string named woed
NDD Delete the down n line where the cursor is located
nyy the down n rows where the cursor is copied
J Combines data from the row of the cursor and the next row into the same row
U Restore previous action
[Ctrl]+rRedo Last Action
ZZ If the file has been altered, save and leave
[Ctrl]+v Block Selection
Multi-window function:
If you want to start another file in a new window, add the file name, or enter only
: SPAppears to be the same file between two windows
^ (* ̄ (oo)  ̄) ^ In fact this part is said to say Vim page, copy, War Day command kill. (pasted command on the ground)
11th Chapter Understanding and Learning Bash
first, know the shell of bash
1. The shell will enter ourCommandAndKernel CommunicationSo that the kernel canControl HardwareTo work correctly and without errors.
As long as an interface capable of manipulating an application can be called a shell.
^ (* ̄ (oo)  ̄) ^ Learning language is like practicing magic, a law, Lawspirit.
features of the Bash shell:
① can memorize used commands .
② command and file completion function , press tab on the line
③ command alias setting function with alias lm= ' |s a| '
④shell script language
Bash Shell's built-in command:type
Type is functionally similar to which.
Shell's variable function:
The display and setting of the variable:
Echo,
unset
① with echo $xxx will be able to get the content of XXX
②unset is the name of the cancel variable
③ single quotes vs double quotes: Double quotation marks can still be the contents of the mailing variables , single quotes can only be ordinary characters, there will be no special symbols
features of environment variables:
Use env to view environment variables and common environment variables
Generate random Number:declare-i number= $RANDOM *10/32768;echo $number
The random number can only be generated from 0 to 32767 .
View all variables with set (with environment variables and custom variables)
The child process inherits only the environment variables of the parent process, and the child process does not inherit the custom variables of the parent process
In referencing your own variable set to a later called file or other program, use the expert variable name
variable keyboard reads, arrays and declarations: Read,array,declare:
1. Chat with users read
Read [-PT] Variable
-P: Can be followed by a prompt
-T: Number of seconds to wait
Declare/typeset
declaring variable type -I shaping,-R read-only-change to + can cancel operation
such as: Declare-i sum=1+2+3
Echo $sum
limitation Management with file systems and programs :ulimit
Restricting user system resources: Number of files, CPU time, total memory
Example: Restrict a user to create files below 10MB only
Ulimit-f 10240
command aliases and history commands
Command alias settings:alias,unalias
Example: Alias lm= ' Ls-l | More
Historical command: history
Such as: Writes the current data to Histfile, history-w
Bash Shell's large operating environment
Bash Login and welcome information :/ETC/ISSUR,/ETC/MOTD
2. Data Flow Redirection
① definition: After a command executes, the data that should appear on the screen is transferred to another place.
Black hole in ②/dev/null Trash Bin
such as: find/home-name. Bash RC 2>/dev/null
the basis for the judgment of the Order execution :; , && | |
It's similar to the C language.
pick Command :cut grep
Sort command :sort WC uniq
①
Sort-M sort by the name of the month
-R to reverse sort
②uniq: Lists duplicate data only one display
-C list Occurrences
③WC: Calculates the overall data of the output information
character Conversion command :tr,col,join,paste,expand
①TR: Delete text of a piece of information, or replace it
Eg: The last output information, lowercase to uppercase last | TR ' [A-z] ' [A-z] '
Delete the colon of the/etc/passwd output information cat/etc/passwd | Tr-d ': '
②col: often used to dump the man page into a text file for easy querying
③Join: Add two files together with the same row that summarizes the same data
④paste: Directly put two lines together, and the Middle tab key to separate
⑤Expand: turn Tab key to space bar
Cut command :split
Eg: Synthesize three files into one cat termcap * >> termcapback
Split into three files cd/tmp; Split-b 300k/etc/termcap termcap
parameter substitution :xargs
Finally, I really like the sentence :
please do not in the most can endure hardship when the choice of ease, no one's youth is on the red carpet through, since the dream to become the other people can not reach the ego, you should choose a belong to their own road, in order to reach the end, pay others can not achieve the effort.
Bird Brother Linux Private cuisine Knowledge points summary 10 to 11 chapters