以前查看自己的历史操作,都是history里来查看的,只有命令,有时候系统返回的什么也没有,看了script可以对自己的操作进行录像,于是自己也做个。

要记录操作之前输入命令:

[root@wulaoer ~]# script -t 2> test.time -a test.txt
Script started, file is test.txt
[root@wulaoer ~]# 

这个时候在输入的命令已经被记录在test.txt这个文件里了。

 1 [root@wulaoer ~]# cat test.txt 
 2 [root@wulaoer ~]# cat test.time 
 3 0.658003 45
 4 0.008807 1
 5 63.881151 1
 6 0.270955 1
 7 0.110210 1
 8 0.160752 1
 9 1.058148 6
10 0.124927 1
11 1.307187 2
12 0.288081 2
13 0.511079 19
14 0.008200 18
15 0.000383 13
16 4.558387 4
17 0.386289 4
18 0.184837 4
19 0.171161 4
20 0.211896 1
21 1.162147 1
22 0.122721 1
23 0.836252 3
24 0.102947 2
View Code

相关文章:

  • 2021-08-16
  • 2021-08-25
  • 2022-02-20
  • 2021-11-20
  • 2021-12-13
  • 2021-07-28
  • 2022-12-23
猜你喜欢
  • 2021-05-21
  • 2021-04-17
  • 2021-12-22
  • 2022-12-23
  • 2021-08-27
  • 2021-05-30
相关资源
相似解决方案