Linux Command tee

简介: Linux Command tee

Linux Command tee

文章目录

1. 简介

Linux tee命令用于读取标准输入的数据,并将其内容输出成文件。

tee指令会从标准输入设备读取数据,将其内容输出到标准输出设备,同时保存成文件。

1832b220aa754cd18c504acc7686a560.png

2. 参数

-a或--append  附加到既有文件的后面,而非覆盖它.
-i或--ignore-interrupts  忽略中断信号。
--help  在线帮助。
--version  显示版本信息。

3. 实例

# 将进程信息通过管道输出到标准输出(终端)并覆盖写入到文件中。
ps -ef |tee info_a.log info_b.log
# 将进程信息通过管道输出到标准输出(终端)并追加写入到文件中。
ps -ef |tee -a info_a.log info_b.log
相关文章
|
6月前
|
关系型数据库 MySQL Shell
【Linux命令】-bash: mysql: command not found
【Linux命令】-bash: mysql: command not found
56 0
|
2月前
|
Linux Shell
mac/linux提示bash: telnet: command not found
mac/linux提示bash: telnet: command not found
|
4月前
|
Linux
Linux命令(62)之tee
Linux命令(62)之tee
29 1
|
5月前
|
Java Linux
linux配置jdk环境出现错误:/usr/libexec/grepconf.sh: line 5: grep: command not found 的解决办法
linux配置jdk环境出现错误:/usr/libexec/grepconf.sh: line 5: grep: command not found 的解决办法
|
Ubuntu Linux 数据库
Linux:报错“command not found: yum”及yum和apt-get的区别
Linux:报错“command not found: yum”及yum和apt-get的区别
772 0
Linux:报错“command not found: yum”及yum和apt-get的区别
|
8月前
|
数据挖掘 Linux 测试技术
Linux中输入所有命令都提示“command not found”,bashrc环境变量异常的解决方案
Linux中输入所有命令都提示“command not found”,bashrc环境变量异常的解决方案
|
8月前
|
Devops Linux 虚拟化
Linux命令ifconfig报错command not found
Linux命令ifconfig报错command not found
102 0
|
消息中间件 运维 监控
Linux Command strace 调试跟踪(1)
Linux Command strace 调试跟踪(1)
Linux Command strace 调试跟踪(1)
|
10月前
|
缓存 Linux
Linux 的 top命令参数详解 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
Linux 的 top命令参数详解 PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
227 0
|
11月前
|
Shell Linux
Linux pip命令报错 -bash: pip: command not found
Linux pip命令报错 -bash: pip: command not found
255 0