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>

Parameter Description

Table 1 Parameters

Parameter

Description

Value Range

data

Indicates the string to be entered, which ends with a space. If you need to enter a space, use "" to enclose the space.

N/A

filename

Indicates the proc file to which data is to be passed.

N/A

Usage

The proc file implements its own write command. After the writeproc command is called, the input parameter will be passed to the write command.

NOTE: The proc file system does not support multi-thread access.

Example

Enter 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.