Quickly create a file

Source: Internet
Author: User
Quickly create a file-general Linux technology-Linux technology and application information. For more information, see. LINUX and unix shell programming guide:
25.1 create a file quickly
You can use this method to quickly create a file and save some text to it:
$ Cat> myfile < You can enter some text, and enter NEWFILE in the new line at the end. in this way, a file named myfile is created, which contains some text. if NEWFILE is entered directly in the first line, an empty file named myfile is created.
If you use the tab key, some older shell versions may not understand its meaning correctly. <Add a horizontal bar -:
Cat> myfile <-NEWLINE
Two problems:
1. What is the role of NEWFILE? I found that using $ cat> myfile can achieve the same effect.
2. After cat> myfile <-NEWLINE is used, the tab key still does not work. Ask you why. Thank you!
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.