Linux Big Summary

Source: Internet
Author: User

---restore content starts---

1. Redirect: Copy the contents of one file to another file

' > '--On behalf of redirection

Eg: write the contents of file A into the B file

Cat A.txt > B.txt

echo 111 > B.txt---REDIRECT 111 to b.txt---will overwrite the contents of the source file

EG2: Use redirection to empty a file (that is, redirect empty content to this file) without deleting the file:

> B.txt---empty b.txt

2. ' >> '--representative append

echo 222 >> b.txt---Append 222 to the B.txt file at the end of the file

3. simultaneous execution of 2 commands ' && '

Eg:cat a.txt > B.txt && >a.txt----copy content to B and empty a

4, Sz a.txt--Download the file to the local

---restore content ends---

Linux Big Summary

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.