1 Star 0 Fork 5K

杜尚坤 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
touch.md 2.89 KB
一键复制 编辑 原始数据 按行查看 历史
NEEN 提交于 2021-03-12 17:59 . !197 Docs Update version 1.0.1

touch

Command Function

  • This command is used to create an empty file in a specified directory.
  • If this command is executed to create an existing file, the execution will be successful but the timestamp will not be updated.

Syntax

touch [filename]

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

filename

Indicates the name of the file to be created.

N/A

Usage

  • The touch command creates a read-write empty file.

  • The touch command creates only one file at a time.

    NOTICE: If you run the touch command to create a file in a path storing important system resources, unexpected results such as a system breakdown may occur. For example, if you run the touch uartdev-0 command in the /dev path, the system may stop responding.

Example

Enter touch file.c.

Output

Figure 1 Creating file.c

1
https://gitee.com/du_shang_kun/docs.git
git@gitee.com:du_shang_kun/docs.git
du_shang_kun
docs
docs
master

搜索帮助