How to create files in a directory in linux

藏色散人
Release: 2022-01-12 15:39:46
Original
61708 people have browsed it

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!