Home >Operation and Maintenance >Linux Operation and Maintenance >How to create files in a directory in linux

How to create files in a directory in linux

藏色散人
藏色散人Original
2020-10-19 14:16:5961777browse

Linux method of creating files in a directory: First open the xshell software to connect to the Linux server; then use [mkdir directory name] to create a directory and cd to the directory; then enter the command [touch file name] to create an empty file ; Finally, use [vim file name] to create an empty file and open it for editing.

How to create files in a directory in linux

Recommended: "linux tutorial"

linux creates files in the directory

Linux has several ways to create files. Today I will demonstrate how Linux creates files in a directory.

Method/Step

Open the xshell software and connect to the linux server.

How to create files in a directory in linux

Use [mkdir directory name] to create a directory and cd to the directory.

How to create files in a directory in linux

#Enter the command [touch file name] to create an empty file.

How to create files in a directory in linux

Use [vim file name] to create an empty file and open it for editing.

How to create files in a directory in linux

Enter [ls -l] to view the files in the current directory, and you can see the file you just created.

How to create files in a directory in linux

Notes

touch creates an empty file with nothing in it.

The above is the detailed content of How to create files in a directory in linux. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn