Welcome: Hunan Intelligent Applications Tecgnology CO.,ltd.-HNIAT.com
Language: Chinese ∷  English

Basic knowledge

What is the command for creating linux files

The file creation command is: 1. "vi file name" command. The file is created after the command is entered and saved; 2. The "touch file name" command is used to change the time of the file or directory. If the file does not exist, it will be automatically created; 3. "Echo file content>file name" command, which will write the specified content to the file.
What is the command for creating linux files
1、vi/vim
one
Vi 1.txt # A file 1.txt will be created and opened directly
Note: The file will not be created until you enter: w to save it. If you exit directly: q, the file will not be created.
2、touch
The Linux touch command is used to modify the time attribute of a file or directory, including access time and change time. If the file does not exist, the system will create a new file.
one
Touch to create a new file name
3、echo
Echo is an output command, which can create a file with the redirection symbol
The echo command is used to display a paragraph of text on the display, which generally serves as a prompt.
The general format of this command is: echo [- n] string
Where option n means no line break after output text; Strings can be quoted or not. When you use the echo command to output quoted strings, output the strings as they are; When you use the echo command to output a string without quotation marks, each word in the string is output as a string, and each string is separated by a space.
one
Echo "abcd">3.txt # You can directly create the file 3.txt and write the abcd to it.

CONTACT US

Contact: Manager Xu

Phone: 13907330718

Tel: 0731-22222718

Email: hniatcom@163.com

Add: Room 603, 6th Floor, Shifting Room, No. 2, Orbit Zhigu, No. 79 Liancheng Road, Shifeng District, Zhuzhou City, Hunan Province

Scan the qr codeClose
the qr code