1 Star 0 Fork 4.9K

丛林 / docs

forked from OpenHarmony / docs 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
kernel-small-debug-shell-file-write.md 3.57 KB
一键复制 编辑 原始数据 按行查看 历史
Annie_wang 提交于 2022-05-19 22:02 . update docs

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

Parameter

Description

Value Range

data

Specifies 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

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

N/A

Usage

The proc file implements its own write command. Calling the writeproc command will pass the input parameters 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.

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

搜索帮助