writeproc
Command Function
This command is used to write data to a specified proc file system. The proc file system supports the input of string parameters. Each file needs to implement its own method.
Syntax
writeproc <data> >> /proc/<filename>
Parameters
Table 1 Parameter description
Specifies the string to be entered, which ends with a space. If you need to enter a space, use "" to enclose the space. |
||
Usage
The proc file implements its own write command. Calling the writeproc command will pass the input parameter to the write command.
NOTE: The procfs file system does not support multi-thread access.
Example
Run writeproc test >> /proc/uptime.
Output
OHOS # writeproc test >> /proc/uptime
[INFO]write buf is: test
test >> /proc/uptime
NOTE: The uptime proc file temporarily implements the write command. The INFO log is generated by the implemented test command.