The method of creating files and folders in linux
First of all, let's talk about the command for touch to create files. Touch can be used to create binaries, which is very simple to use.
Usage: touch+ file name, there must be a space between touch and file name.
In the figure, use the previously shared commands to see how many files are under the / directory and the names of the files.
Here we are going to demonstrate the use of touch. For example, if I want to create a binary file named abc, then the formula in linux should be written as # touch abc
The specific operation is shown in the figure:
After the creation is complete, use the ls command to look at the file we created. You can see that the abc file indicated by the red arrow in the picture is the newly created file.
In talking about a command mkdir to create a folder, mkdir can create a folder, the use is very simple.
Usage: mkdir+ folder name. There must be a space between mkdir and file name.
In the figure, use the previously shared commands to see how many files are under the / directory and the names of the files.
Here we are going to demonstrate the use of mkdir. For example, if I want to create a folder with the file name one, then the formula in linux should be written as # mkdir one.
The specific operation is shown in the figure:
After the creation is complete, use the ls-l command to check the properties of the file. You can see that the folder pointed to by the red arrow in the picture is the newly created folder.
These are the details of how to create files and folders in linux. For more information, please follow other related articles!