In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail the methods of creating new linux files for you. The editor thinks it is very practical, so I share it with you for reference. I hope you can get something after reading this article.
Linux new file methods are: 1, use redirect symbols to create a file; 2, use the touch command to create a file; 3, use the echo command to create a file; 4, use the printf command to create a file; 5, use the cat command to create a file.
There are several ways to create a file under linux, as follows:
1. Create a file on Linux using the redirector (>)
The standard redirector allows us to create an empty file for 0KB. It is usually used to redirect the output of a command to a new file. When you use a redirect symbol without a command, it creates a file.
But it does not allow you to enter any text into the file when you create it. However, it is very simple and useful for administrators who are not very hardworking. Just enter the redirector followed by the file name you want.
2. Use the touch command on Linux to create a file
The touch command is often used to update the access and modification time of each file to the current time.
If the specified file name does not exist, a new file will be created. Touch does not allow us to enter some text into a file while creating it. It creates an empty file of 0KB by default.
3. Use the echo command on Linux to create a file
Echo is built into most operating systems. It is often used in scripts, batch files, and as part of a single command that inserts text.
It allows you to enter some text into a file when you create it. Of course, it also allows you to enter some text into it later.
4. Use the printf command on Linux to create a new file
The usage is the same as echo.
5. Create a file using cat in Linux
Cat means concatenated concatenate. In Linux, it is often used to read data in a file.
Cat is one of the most commonly used commands in Unix-like systems. It provides three functions related to a text file: displaying the contents of one file, combining the contents of multiple files into one output, and creating a new file.
This is the end of the method of creating new files for linux. I hope the above content can be of some help to you and learn more knowledge. If you think the article is good, you can 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.