Linux shell tee 命令
来源:互联网 发布:中小学课本同步软件 编辑:程序博客网 时间:2024/05/22 13:30
tee:读取标准输入的数据,并将其内容输出成文件。
语 法:tee [-ai][--help][--version][文件…]
补充说明:tee指令会从标准输入设备读取数据,将其内容输出到标准输出设备,同时保存成文件。我们可利用tee把管道导入的数据存成文件,甚至一次保存数份文件。
参 数:
-a 附加到既有文件的面,而非覆盖它。如果给予tee指令的文件名 称已经存在,预设会覆盖该文件的内容。加上此参数,数据会新 增在该文件内容的最面,而不会删除原先之内容。
-i 忽略中断信号
--help 在线帮助
--version 显示版本信息
举例:
1 列出文本文件slayers.story的内容,同时复制3份副本,文件名称分别为ss-copy1、ss-copy2、ss-copy3:
$ cat slayers.story |tee ss-copy1 ss-copy2 ss-copy3
2 把列出当前目录,并把结果结到myfile里
$ls -l |tee myfile
注:使用下面的方法重定向,中间的文件为空,只有最后一个起作用:
ll > aaa.txt > bbb.txt # 这时aaa.txt 内容为空
ll > aaa.txt >/dev/stdout #aaa.txt 为空,只重定向到了标准输出
0 0
- Linux shell tee 命令
- linux shell用法(1)-- tee命令
- Shell之tee命令(man tee)
- linux shell--tee
- Linux Shell脚本编程--tee命令
- Linux Shell脚本入门--tee命令
- linux shell 脚本【3】 ---- 重定向 与 tee 命令
- [Shell]给linux命令tee输出文件加个时间
- linux tee命令
- linux tee命令
- Linux:tee命令
- linux命令之tee
- linux tee 命令详解
- linux tee 命令
- linux tee命令详解
- linux tee 命令详解
- linux tee 命令详解
- linux tee命令
- The 2014 ACM-ICPC Asia Mudanjiang Regional Contest - H
- 编程练习思考[3]---leetcode--Maximum Product Subarray
- JUnit中@Test的执行顺序
- MYSQL全文索引—CONTAINS语法
- Linux API 网址转换(DWORD, IP,域名)
- Linux shell tee 命令
- C#文字转换为声音
- java 版DES和MAC算法
- 数据结构课设-弗洛伊德算法C语言实现
- DirectX (13) 粒子系统
- 读“赵4老师”言论
- sprintf函数详解
- [数据结构与算法]拓 扑 排 序
- 网站投资提示