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