script和scriptplay可以把终端会话记录到一个文件中,可以用来制作命令行教学视屏。

开始录制会话

[root@new test]# script -t >timing.log -a output.session
Script started, file is output.session
[root@new test]# echo hello
hello
[root@new test]# echo world
world
[root@new test]# pwd
/test
[root@new test]# exit
exit
Script done, file is output.session

回放会话

[root@new test]# scriptreplay timing.log output.session
[root@new test]# echo hello
hello
[root@new test]# echo world
world
[root@new test]# pwd
/test

Linux命令之乐--script和scriptplay的更多相关文章

  1. Linux命令之乐--grep

    正则表达式基本组成部分 Normal 0 7.8 磅 0 2 false false false EN-US ZH-CN X-NONE MicrosoftInternetExplorer4 /* St ...

  2. Linux命令之乐--cat

    cat命令的用途是连接文件或标准输入并打印.这个命令常用来显示文件内容,或者将几个文件连接起来显示,或者从标准输入读取内容并显示,它常与重定向符号配合使用. 命令参数: -A, --show-all  ...

  3. Linux命令之乐--sed

    sed是stream edit的缩写,是处理文本非常重要的工具. 常见用法: 1. 替换文本 1.1 替换文本中的第一处符合的样式 sed 's/pattern/replace_string' fil ...

  4. Linux命令之乐--find

    find是命令行工具箱中最棒的命令之一. 列出当前目录及其子目录中的文件和文件夹. [root@LAMP WebRoot]# find . -print../index.jsp./upload.jsp ...

  5. Linux命令之乐--md5sum

    md5sum命令用于生成和校验文件的md5值.它会逐位对文件的内容进行校验,它常用于检查文件的完整性. 读取文件的MD5值 [root@new ~]# md5sum /usr/local/sbin/* ...

  6. Linux命令之乐--read

    read 命令从标准输入中读取一行,并把输入行的每个字段的值指定给 shell 变量 -p:后接屏幕输出的提示语句 -n:设定输入的字符个数,当达到指定的个数则自动退出,并将输入赋予给变量 -t:当输 ...

  7. Linux命令之乐--time

    time用于统计命令执行花费的总时间 例一: [root@Director usr]# time ls bin etc games include java lib lib64 libexec loc ...

  8. Linux命令之乐--awk

    1.脚本参数传值 #/bin/bash awk '"} {if(($1==a)) print $2;}' /etc/hosts 执行结果:

  9. Linux命令之乐--iconv

    用法: 实际应用: 批量转换文件编码: [root@wls12c PCK]$ for tfile in `ls -l|awk '{print $9}'`;do echo "iconv -f ...

随机推荐

  1. Python 常见错误及解决办法

    错误: Traceback (most recent call last): File "I:/Papers/consumer/codeandpaper/RegressionandGBDTa ...

  2. python --文本文件的输入输出

    转自:http://www.cnblogs.com/vamei/archive/2012/06/06/2537868.html Python具有基本的文本文件读写功能.Python的标准库提供有更丰富 ...

  3. [显示属性]-自定义桌面里没有IE选项

    1楼 哈哈,我来告诉你原因,微软为了应对欧盟的反垄断调查,在 SP3 的“自定义桌面”里去掉了 Internet Explorer 选项. 如果桌面 IE 图标被误删除,但是又想恢复,而不是建立快捷方 ...

  4. Refresh Tokens: When to Use Them and How They Interact with JWTs

    In this post we will explore the concept of refresh tokens as defined by OAuth2. We will learn why t ...

  5. maple minimax函数

    numapprox[minimax] - minimax rational approximation Calling Sequence   minimax(f, x=a..b, [m, n], w, ...

  6. 从零开始学习OpenCL开发(一)架构

    1 异构计算.GPGPU与OpenCL OpenCL是当前一个通用的由很多公司和组织共同发起的多CPU\GPU\其他芯片 异构计算(heterogeneous)的标准,它是跨平台的.旨在充分利用GPU ...

  7. CYQ学习主要摘要

    这个个人搞的框架不知道到底怎么样,做个项目测试下看看,本来想用EF的,大多数人说性能低,所以先放弃,试试这个,一些主要地方我做个摘录 5:多表怎么搞定? A:视图方式,将多表查询放到数据库里成视图,情 ...

  8. 每日英语:Stalled Project Shows Why China's Economy Is Wobbling

    CAOFEIDIAN, China  $91 billion industrial project here, mired in debt and unfulfilled promise, sugge ...

  9. 认识rem

    <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8&quo ...

  10. Git出现error: Your local changes to the following files would be overwritten by merge: ... Please, commit your changes or stash them before you can merge.的问题解决(Git代码冲突)

    在使用git pull拉取服务器最新版本时,如果出现error: Your local changes to the following files would be overwritten by m ...