Linux屏幕记录命令script

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

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

# 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是追加,不会覆盖以往的记录。ip

相关文章
相关标签/搜索