How to create an empty file (0-byte size) using Linuxshell

Source: Internet
Author: User
The method echo & gt; fileName used to create an empty file (0-byte size) in Linuxshell is one byte. After learning, it is found that the file that creates an empty file (0 byte size) has the following methods: 1. when the file does not exist, touchfile can create an empty file 2,: & gt; file can create an empty file ,... linux shell to create an empty file (0 byte size) method echo> fileName to create a file is 1 byte. After learning, you can find that the file that creates an empty file (0 byte size) has the following methods: 1. if the file does not exist, touch file can create an empty file. 2. file can create an empty file, if a file exists, the file is truncated to 0 Bytes. 3.> file can be used to complete the same functions as:> file in bash, however, tcsh cannot use the same functions as file. if bash completes:> file, but tcsh cannot use the following functions, no content is output here. V. cat/dev/null> file 6. mktemp
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.