2022-07-15 22:37:32 +08:00
|
|
|
# tee
|
2019-12-18 15:48:29 +08:00
|
|
|
|
2020-08-07 18:28:00 +08:00
|
|
|
[`tee`在线教程](https://arthas.aliyun.com/doc/arthas-tutorials.html?language=cn&id=command-tee)
|
2020-07-23 15:19:04 +08:00
|
|
|
|
2022-07-15 22:37:32 +08:00
|
|
|
::: tip
|
|
|
|
类似传统的`tee`命令, 用于读取标准输入的数据,并将其内容输出成文件。
|
2019-12-18 15:48:29 +08:00
|
|
|
|
2022-07-15 22:37:32 +08:00
|
|
|
tee 指令会从标准输入设备读取数据,将其内容输出到标准输出设备,同时保存成文件。
|
|
|
|
:::
|
2019-12-18 15:48:29 +08:00
|
|
|
|
2022-08-09 18:42:39 +08:00
|
|
|
## 使用参考
|
|
|
|
|
2019-12-18 15:48:29 +08:00
|
|
|
```
|
|
|
|
USAGE:
|
|
|
|
tee [-a] [-h] [file]
|
|
|
|
|
|
|
|
SUMMARY:
|
|
|
|
tee command for pipes.
|
|
|
|
|
|
|
|
EXAMPLES:
|
|
|
|
sysprop | tee /path/to/logfile | grep java
|
|
|
|
sysprop | tee -a /path/to/logfile | grep java
|
|
|
|
|
|
|
|
WIKI:
|
2020-08-10 19:22:28 +08:00
|
|
|
https://arthas.aliyun.com/doc/tee
|
2019-12-18 15:48:29 +08:00
|
|
|
|
|
|
|
OPTIONS:
|
|
|
|
-a, --append Append to file
|
|
|
|
-h, --help this help
|
|
|
|
<file> File path
|
2022-07-15 22:37:32 +08:00
|
|
|
```
|