Kill lui lei dog---linux no:14 linux system redirection

Source: Internet
Author: User

To test the system redirection, we first created two files with the name Leigood Leigood2 and then we gave Leigood input as follows:

Leigood This file is clearly 14 bytes in it.

Then we use cat to see:

Leigood This content is Hello Leigood ...

If we just use a < input redirect, then his effect will just read the contents of the file, and the effect is as follows:

Then we need to use the Redirect method to write the contents of Leigood inside the LEIGOOD2:

This way we can redirect the leigood2 directly into the Leigood.

And even if we modify the content inside the leigood2 leigood nothing changes in the content ...

Input redirection We don't use much, but the output redirects us to use more of the Oh, hehe ...

Output redirection This is more or less used, such as:

ll we usually use this command when the content of the file is displayed, but if we use the > output redirect then his content will be saved to the specified file, the effect is as follows:

If you are using an output redirection when using > a greater than sign, then the next content will be overwritten, but the use of >> two cases, then he will be an additional way to redirect the output ....

Error redirection is actually better understood, such as our command is wrong, we can use error redirection to save the error message, as follows ...

In fact, there are some common examples:

Kill lui lei dog---linux no:14 linux system redirection

Related Article

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.