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]
Parameters
Table 1 Parameter description
Usage
-
The touch command creates an empty file that is readable and writeable.
-
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
Run touch file.c.