码迷,mamicode.com
首页 > 系统相关 > 详细

Linux屏幕记录命令script

时间:2016-09-16 12:57:25      阅读:343      评论:0      收藏:0      [点我收藏+]

标签:

Script -a action.log –t 2> time.log
按ctrl+d 退出录制
回访 scriptreplay time.log action.log或者直接用查看命令cat,tail查看

作用
1 对登陆系统人员执行命令进行记录
$ vi ~/.profile

# run the script command to record everything
# use -q for quite and -a option to append the script
#
/usr/bin/script -qa /usr/local/script/log_record_script
选项-q是安静模式。用户登录时完全不会察觉到script命令的运行。而选项-a是追加,不会覆盖以往的记录。

 

Linux屏幕记录命令script

标签:

原文地址:http://www.cnblogs.com/zhouhbing/p/5876193.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!