文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>如何使程序的执行结果同时定向到屏幕和文件

如何使程序的执行结果同时定向到屏幕和文件

时间:2006-09-25  来源:fytzzh

tee命令可以使程序的执行结果同时定向到标准输出和文件中。 它的一般用法为: tee -a files   -a 表示追加到文件结尾.   如: [zhanghua@localhost daemon]$ who | tee /tmp/who.out
zhanghua pts/0        Oct 23 10:15 (172.16.102.81)
zhanghua pts/1        Oct 23 10:40 (172.16.102.81)
root     pts/2        Oct 23 14:30 (172.16.102.81)
root     pts/3        Oct 23 14:42 (172.16.102.81)
[zhanghua@localhost daemon]$ cat /tmp/who.out
zhanghua pts/0        Oct 23 10:15 (172.16.102.81)
zhanghua pts/1        Oct 23 10:40 (172.16.102.81)
root     pts/2        Oct 23 14:30 (172.16.102.81)
root     pts/3        Oct 23 14:42 (172.16.102.81)
相关阅读 更多 +
排行榜 更多 +
卡通射击战场

卡通射击战场

飞行射击 下载
飞行汽车模拟器3d

飞行汽车模拟器3d

飞行射击 下载
弓箭手传奇魔法英雄免费版

弓箭手传奇魔法英雄免费版

休闲益智 下载