Linux command essay

Source: Internet
Author: User
Tags function definition

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

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.