您的位置:首页 > 运维架构 > Linux

Linux tee命令

2015-12-01 21:30 519 查看
一、简介

tee以标准输入作为输入,标准输出和文件作为输出。

 

二、语法

Usage: tee [OPTION]... [FILE]...
Copy standard input to each FILE, and also to standard output.

-a, --append              append to the given FILEs, do not overwrite
-i, --ignore-interrupts   ignore interrupt signals
--help     display this help and exit
--version  output version information and exit

If a FILE is -, copy again to standard output.


 

三、实例

1)使用tee命令把标准错误输出也保存到文件

ls "*" 2>&1 | tee ls.txt


 

参考:/article/4053447.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: