Linux Common Command accumulation

Source: Internet
Author: User

A few days ago in Imooc casually read a public class, learned a few common commands, recorded here, slowly accumulate. It feels like learning one, sometimes it's better to have a better memory than to follow a book and learn from the beginning.

1. Echo $? This command can print the program return value after the program is run. For example, 0 or 1 is returned in main.

2. Cat T.txt is displayed to the terminal. (The cat command should be a connection, this should be omitted from the standard output)

3../a.out |  > T.txt pipeline, Output redirected to T.txt file, here is the overlay method:/a.out | >> T.txt Here is the Append method.

4../a.out | < Input.txt pipeline, input stream redirection.

5. grep ab is found to contain AB. such as LS | > grep AB

6. Continuous execution of GCC main.c-o main.out &&./main.out commands. Only the previous command executes successfully, and the latter one executes. Like./main.out && ls


Linux Common Command accumulation

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.