命令行操作记录工具
2016-12-27 22:13
246 查看
script工具可以记录shell回话。
在命令行输入“script”,系统将会提示"Script started,file is typesctript"。接下来随便输入几个命令,用户在命令行的操作会自动保存在typesctript文件中。
使用exit命令终止script会话。用"cat typescript"来显示之前记录的内容。
例如::~$ script
脚本已启动,文件为 typescript
:~$ ls -l /bin |head -5
总用量 11136
-rwxr-xr-x. 1 root root 1045704 6月 24 2016 bash
-rwxr-xr-x. 1 root root 34888 5月 4 2016 bunzip2
-rwxr-xr-x. 1 root root 1996936 8月 24 03:36 busybox
-rwxr-xr-x. 1 root root 34888 5月 4 2016 bzcat
:~$ exit
exit
脚本完成,文件为 typescript
:~$ cat typescript
脚本启动于 2016年12月27日 星期二 22时09分18秒
:~$ ls -l /bin |head -5
总用量 11136
-rwxr-xr-x. 1 root root 1045704 6月 24 2016 bash
-rwxr-xr-x. 1 root root 34888 5月 4 2016 bunzip2
-rwxr-xr-x. 1 root root 1996936 8月 24 03:36 busybox
-rwxr-xr-x. 1 root root 34888 5月 4 2016 bzcat
:~$ exit
exit
脚本完成,于 2016年12月27日 星期二 22时09分55秒
:~$
以上是完整的演示。
在命令行输入“script”,系统将会提示"Script started,file is typesctript"。接下来随便输入几个命令,用户在命令行的操作会自动保存在typesctript文件中。
使用exit命令终止script会话。用"cat typescript"来显示之前记录的内容。
例如::~$ script
脚本已启动,文件为 typescript
:~$ ls -l /bin |head -5
总用量 11136
-rwxr-xr-x. 1 root root 1045704 6月 24 2016 bash
-rwxr-xr-x. 1 root root 34888 5月 4 2016 bunzip2
-rwxr-xr-x. 1 root root 1996936 8月 24 03:36 busybox
-rwxr-xr-x. 1 root root 34888 5月 4 2016 bzcat
:~$ exit
exit
脚本完成,文件为 typescript
:~$ cat typescript
脚本启动于 2016年12月27日 星期二 22时09分18秒
:~$ ls -l /bin |head -5
总用量 11136
-rwxr-xr-x. 1 root root 1045704 6月 24 2016 bash
-rwxr-xr-x. 1 root root 34888 5月 4 2016 bunzip2
-rwxr-xr-x. 1 root root 1996936 8月 24 03:36 busybox
-rwxr-xr-x. 1 root root 34888 5月 4 2016 bzcat
:~$ exit
exit
脚本完成,于 2016年12月27日 星期二 22时09分55秒
:~$
以上是完整的演示。
相关文章推荐
- 命令行下的学习工具记录
- 命令行手工测试日志的自动记录工具开发思路
- TCPDUMP(命令行操作)-抓包、筛选、高级筛选、过程文档记录
- Python之Fabric模块 Fabric是基于Python实现的SSH命令行工具,简化了SSH的应用程序部署及系统管理任务,它提供了系统基础的操作组件,可以实现本地或远程shell命令,包括:
- Linux 入门记录:一、命令行 Bash 的基本操作
- NCover.Console.exe 命令行操作记录
- linux下监控用户操作记录的工具
- 【好工具分享】如何进行屏幕录像记录操作步骤录制教程保存回放
- 命令行操作记录
- zookeeper学习记录-05 Zookeeper命令行操作
- exchange命令行管理工具"常用操作命令
- FAT32、NTFS文件直接操作小工具(上图MARK记录)
- redis 命令行操作记录
- 【好工具分享】如何进行屏幕录像记录操作步骤录制教程保存回放
- 记录hadoop几个好用的命令行操作
- 【转】Secedit:命令行下操作组策略找工具
- redis 命令行操作记录
- linux 命令行操作 记录
- Android 命令行操作 [记录]
- 版本控制工具SVN的操作记录