In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Today, the editor shares with you the method of creating files in the Linux system, which is not well understood by many people. Today, in order to give you a better understanding of the methods of creating files in the Linux system, the editor summarizes the following contents and looks down together. I'm sure you'll get something.
How to create a file in Linux:
1. You can create a new file using cat
Command: cat > > filename
When you use cat to create a file, use the system default file properties as the properties of the new file, and accept keyboard input as the contents of the file. Press Ctrl+d at the end of the entry to exit and save the file.
In addition, you can view the contents of the file using the cat filename command.
2. Use the touch command to create files
The initial function of the touch command is to modify the "access time" or "modification time" of the file. When the file specified by the touch command does not exist, the touch command creates a new file with the specified name.
The command is used as follows:
For files that do not exist, the touch command creates the file
# use the touch command to create a file os@DESKTOP-2DHQBVS:~$ touch tedu.txt# visible file created successfully os@DESKTOP-2DHQBVS:~$ ls-ltotal 0 os os RWL RW-1 os os 0 Sep 26 11:32 tedu.txt# note that the modification time of this file is 11:32
3. Use a text editor to create a file
In the Linux distribution, there are one or more text editors in the terminal environment, such as vi, vim, nano and other text editors. There are also some text editors in the GUI desktop environment, such as Ubuntu's Gedit editor.
Most files are actually text documents, so using a text editor to create files is a more common way to create files.
The method of creating files in the Linux system is shared here, of course, not only the above and everyone's analysis methods, but the editor can ensure its accuracy is absolutely no problem. I hope that the above content can have a certain reference value for everyone, and can be put into practice. 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: 263
*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.