1. 1> 2> redirect
2. Alias rm = ' RM-RF ' on ~/.bashrc or ~/.ZSHRC
3.date Gets the current time date +%s (the number of milliseconds in 1970)
4.= define variable, = cannot have spaces on either side.
5.$ variable name get variable, set variable
6. function fname () {} Defines a functional fname is the execution of a function (the other scripts are fname () with a ()) fname arg1 arg2 Pass parameters. There is no formal parameter. The get parameter is $ $, the list property is [Email protected]
7.:() {:|:&};: Fork bomb:() defines a function whose name is:: Recursive invocation: |: Variable execution also fork process & decoupling so that the initial ":" function is killed for the two ":" Functions it calls after it is executed; function definition End: Call this function
8. Export-F fname exported function (parameter-f)
9.unset -F fname Delete function unset-v variable name delete variable
10. How to pass parameters: Command-p-v-k 1 file = can be command-pvk 1 file and can be command-pv-k 1 the file parameter can be passed in any way
11.CM1 | cm2 | cm3 is used as a conduit for output and input stdin stdout | is the logo of the piping pipe.
Cat -n means plus line number ls | Cat-n
cat: 1. Displays the entire file at once. $ cat filename 2. Create a file from the keyboard. $ cat > FileName can only create new files and cannot edit existing files. 3. Merge several files into one file: $cat file1 file2 > file
Cat also has the role of creating files
14.| Save the value on the variable, use $ () to assign the value to the TT tt=$ (ls | cat-n)
15. Write function in one line: repeat () {while:;d o [email protected] && Return;done}
While loop:
Format One
While condition
Do
Statement
Done
Format three dead Loops
While:
Do
Statement
Done
Format Four dead Loops
While [1]
Do
Statement
Done
Format Five Dead Loops
While [0]
Do
Statement
Done
16. | Od-b Output binary format
Linux command essay