在Linux上录制终端的操作
在Linux上录制终端的操作
来源 http://blog.51cto.com/stuart/1831570
一、安装基础软件包
|
1
|
[root@test software]# yum install libMagickCore libMagickWand libjpeg-turbo-devel libjpeg-turbo libpng-devel compat-glibc-headers libbsd-devel xdotool -y |
二、安装ttyrec
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
[root@test software]# tar xf ttyrec-1.0.8.tar.gz[root@test software]# unzip -q ttyrec-1.0.8.RHEL5.patch.zip[root@test software]# cd ttyrec-1.0.8[root@test ttyrec-1.0.8]# patch -i ttyrec-1.0.8.RHEL5.patch //打补丁patching file Makefilepatching file ttyrec.c[root@test ttyrec-1.0.8]# makegcc -O2 -DHAVE_openpty -c -o ttyrec.o ttyrec.cgcc -O2 -DHAVE_openpty -c -o io.o io.cgcc -O2 -DHAVE_openpty -o ttyrec ttyrec.o io.o -lutilgcc -O2 -DHAVE_openpty -c -o ttyplay.o ttyplay.cgcc -O2 -DHAVE_openpty -o ttyplay ttyplay.o io.ogcc -O2 -DHAVE_openpty -c -o ttytime.o ttytime.cgcc -O2 -DHAVE_openpty -o ttytime ttytime.o io.o[root@test ttyrec-1.0.8]# lltotal 188-rw-r--r-- 1 root root 4193 Jun 11 2006 io.c-rw-r--r-- 1 root root 371 Jun 11 2006 io.h-rw-r--r-- 1 root root 4256 Jul 23 04:32 io.o-rw-r--r-- 1 root root 654 Jul 23 04:32 Makefile-rw-r--r-- 1 root root 429 Jun 11 2006 README-rw-r--r-- 1 root root 1588 Mar 13 2015 tty2gif.py-rwxr-xr-x 1 root root 20327 Jul 23 09:57 ttygif-rwxr-xr-x 1 root root 15447 Jul 23 04:32 ttyplay-rw-r--r-- 1 root root 1128 Jun 11 2006 ttyplay.1-rw-r--r-- 1 root root 7687 Jun 11 2006 ttyplay.c-rw-r--r-- 1 root root 8648 Jul 23 04:32 ttyplay.o-rwxr-xr-x 1 root root 24505 Jul 23 04:32 ttyrec-rw-r--r-- 1 root root 1454 Jun 11 2006 ttyrec.1-rw-r--r-- 1 root root 935 Jul 23 04:31 ttyrec-1.0.8.RHEL5.patch-rw-r--r-- 1 root root 9789 Jul 23 04:32 ttyrec.c-rw-r--r-- 1 root root 145 Jun 11 2006 ttyrec.h-rw-r--r-- 1 root root 18168 Jul 23 04:32 ttyrec.o-rw-r--r-- 1 root root 441 Jul 23 09:21 ttyrecord-rwxr-xr-x 1 root root 9995 Jul 23 04:32 ttytime-rw-r--r-- 1 root root 432 Jun 11 2006 ttytime.1-rw-r--r-- 1 root root 2459 Jun 11 2006 ttytime.c-rw-r--r-- 1 root root 2152 Jul 23 04:32 ttytime.o[root@jrgc ttyrec-1.0.8]# cp ttyplay ttyrec ttytime /usr/local/bin[root@jrgc ttyrec-1.0.8]# ttyrec //进行录制[root@jrgc ttyrec-1.0.8]# echo "hello,word"hello,word[root@jrgc ttyrec-1.0.8]# exit //结束录制[root@test ttyrec-1.0.8]# ttyplay ttyrecord //本地播放,ttyrecord录制后默认文件,可以自定义文件[root@test ttyrec-1.0.8]# ttyrec test //自定义录制文件[root@test ttyrec-1.0.8]# ll test-rw-r--r--. 1 root root 466 Jul 23 19:28 test |
三、将录制文件转换成GIF
|
1
2
3
4
5
6
7
8
9
10
11
|
[root@test software]# unzip -q seq2gif-master.zip[root@test seq2gif-master]# ./configure[root@test seq2gif-master]# make[root@test seq2gif-master]# make install[root@test ttyrec-1.0.8]# seq2gif -i ttyrecord -o tty.gif[root@test ttyrec-1.0.8]# ll tty.gif-rw-r--r--. 1 root root 28068 Jul 23 19:31 tty.gif附录:git clone https://github.com/saitoha/seq2gifwget http://0xcc.net/ttyrec/ttyrec-1.0.8.tar.gzwget https://codeload.github.com/gist/08c41b8b16ca3b969df4/zip/62767e5f3564346394f5a21bd4fe377d2e05c51c |
四、结果

在Linux上录制终端的操作的更多相关文章
- 如何在 Linux 上录制你的终端操作
导读 录制一个终端操作可能是一个帮助他人学习 Linux .展示一系列正确命令行操作的和分享知识的通俗易懂方法.不管是出于什么目的,从终端复制粘贴文本需要重复很多次,而录制视频的过程也是相当麻烦,有时 ...
- linux之shell终端使用操作快捷键
所谓的shell终端就是桌面右键里面的打开终端那个终端 敲命令是一件很有趣的事,可是有时候我们会遇到一些很麻烦的事 例如,命令太长导致敲完后一大串字符可读性低,想把vi filename 快速改为ca ...
- linux文件或文件夹常见操作,排查部署在linux上程序问题常用操作
创建文件夹 mkdir [-p] DirName [ 在工作目录下,建立一个名为 A 新的子目录 : mkdir A 在工作目录下的 B目录中,建立一个名为 T 的子目录: 若 B 目录不存在,则 ...
- 如何在linux下录制terminal操作?
相关包: ttyrec: ttyrec is a tty recorder. Recorded data can be played back with the included ttyplay co ...
- 在Windows上使用终端模拟程序连接操作Linux以及上传下载文件
在Windows上使用终端模拟程序连接操作Linux以及上传下载文件 [很简单,就是一个工具的使用而已,放这里是做个笔记.] 刚买的云主机,或者是虚拟机里安装的Linux系统,可能会涉及到在windo ...
- 提升效率的Linux终端快捷操作汇总
很多普通 Linux 桌面用户都对使用终端感到排斥和恐惧,其实它没大家想的那么复杂,很多常见操作都可以直接在终端中进行,如:安装软件.升级系统等. 无论你是新手还是 Linux 终端使用的老鸟,系统极 ...
- Linux终端快捷操作汇总
定位单词 在长段的命令中,使用 Ctrl + ← 和 Ctrl + → 可快速将光标定位到命令中单词的首字母或末尾,实现在各单词之间的快速跳动定位. 你可以试着在终端中输入 apt-get insta ...
- jmeter操作数据库,分布式,在Linux上运行
jmeter操作数据库: 1.在测试计划中导入数据库jar包 2.添加链接数据库信息 3.mysql:jdc:mysql://192.168.1.116:3307/bugfree?allowMulti ...
- C++的标准库函数默认都是操作字节,而不是字符,非常痛苦,所以引入了u16string和u32string(Linux上的wchar_t是32位的原因,utf16对unicode的支持是有缺陷的)good
时至今日,字符串使用unicode已经是不需要理由的常识,但对一些有着悠久历史的编程语言来说,这仍然是个头痛的问题.如果抛开第三方库的支持,C++其实并不能实际有效地支持unicode,即使是utf8 ...
随机推荐
- v-for的简单实现
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- 【赛时总结】 ◇赛时·III◇ AtCoder ABC-099
◆赛时·III◆ ABC-099 ■唠叨■ 不要问我为什么先给ABC-100写了博客再写的ABC-099-- 莫名觉得这次比赛特别简单--虽然我并没有参加比赛,只是之后再补做的.QwQ ■试题& ...
- 爬虫学习(十五)——json解析
json与jsonpath 对象{}:jsonobject 对象:对象在js中表现为{}括起来的内容,数据结构为{key:value,key:value...}键值对的结构,在面向对象的结构中,key ...
- Percona-Tookit工具包之pt-pmp
Preface Sometimes we need to know the details of a program(porcess) when it is running even ...
- 用h+c实现天天生鲜首页
网页效果图:http://www.dycun.cc/ 如下: css代码 main.css: /*因为大部分的字体都是12px,颜色一致, 所以统一设置下*/ body{ font-size: 12p ...
- 正则(re 模块)
就其本质而言,正则表达式(或 RE)是一种小型的.高度专业化的编程语言,(在Python中)它内嵌在Python中,并通过 re 模块实现.正则表达式模式被编译成一系列的字节码,然后由用 C 编写的匹 ...
- CentOS7 配置环境
1.安装CentOS 配置环境 (1)虚拟机中安装CentOS,进入系统使用yum命令不止正常执行…… 原因: 需要设置网卡激活 解决方法: vi /etc/sysconfig/network-scr ...
- 24-webhost的配置
1-新建asp.net core空项目 2-创建setting.json文件 3- 配制Progrom类中CreateWebHostBuilder 4-获取配置的文件 5-显示结果
- perl语言入门总结-第2章
$what ='steak'; print "fred ate $n ${what}s.\n"; 布尔值 如果是数字0为假, 如果是空字符串''为假, 如果即不是数字也不是字符串, ...
- Oozie wordcount实战
一.定义 基本概念 Action: An execution/computation task (Map-Reduce job, Pig job, a shell command). It can a ...