Linux屏幕记录命令script

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

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