Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the command to create a new file in the linux system

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Today, the editor to share with you is the linux system new file command is, I believe many people do not understand, in order to let you know more about the linux system new file command, so give you a summary of the following content, let's look down. I'm sure you'll get something.

The commands that Linux can use to create files are: vi/vim, touch, echo.

Examples of specific use:

1 、 vi/vim

Vi 1.txt # creates and opens a file 1.txt directly

Note: only when you save the file by entering: W will the file be really created. If you exit directly, the file will not be created.

2 、 touch

The role of touch is to change the time of a file or directory, and it can also be used to create a file that does not exist.

Touch 2.txt # if 2.txt does not exist, create an empty file 2.txt

3 、 echo

Echo is an output command, which can be used to create files with redirect symbols.

Echo "abcd" > 3.txt # can directly create the file 3.txt and write the abcd.

On the linux system to create new files on what the command is shared here, I hope that the above content can have a certain reference value, you can learn to apply. If you like this article, you might as well share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report