Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use ttyrec and ttyplay commands in linux

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly shows you "how to use ttyrec and ttyplay commands in linux". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn how to use ttyrec and ttyplay commands in linux.

Ttyrec & ttyplay

By looking at the name, you can see that the ttyrec command is used to record the terminal session, and the ttyplay is used to play the session recorded by ttyrec.

Here are man screenshots of these tools:

> ttyrec

> ttyplay

Test environment

System-Ubuntu 13.04

Shell-Bash 4.2.45

Application-ttyrec 1.0.8-5 & ttyplay 1.0.8-5

Concise tutorial

Here's how to use these commands to record and play a terminal session.

Step-1

To start recording a terminal session, simply run the following command:

$ttyrec [file name]

The parameter [file name] (the command shown above) is an option that can specify any name you want. The record file will be saved under this name. If you do not specify a file name, ttyrec will use ttyrecord as the default file name.

Step-2

When you want to record, you can run this command and start recording the session. The ttyrec command can even record the sessions of command-line tools such as vi,nano,emacs,lynx.

Step-3

By the time you want to end the terminal session, just run the exit command and the session recording will end. The record file will be saved in the current folder.

You can run the following command to play this file:

$ttyplay [file name]

The parameter [file name] is the name of the record file, which is the name given by the ttyrec command above. If no filename is specified, the default filename is ttyrecord.

When you run ttyplay, playback session recording will begin. Here are some keyboard shortcuts that you can use when you play back the conversation.

The'+'or'f 'keys can be accelerated to twice the normal playback speed.

The'-'or's' keys can slow down to normal playback speed.

'0' can be paused.

'1' can return to normal playback speed.

There are some options supported by other ttyrec and ttyplay commands:

> ttyrec

> ttyplay

There is another gadget, ttytime, that can be used to display the time recorded by the session with the ttyrec tool. It is easy to use and only needs to record the file name as a command line argument.

To give an example:

$ttytime record_file 29 record_file

This way you can see that the ttytime command displays the time of the session log file record_file.

Here is a useful video of the ttyrec and ttyplay commands:

Youtube video

Download / install / configure

Here are some important links to these tools:

Home page

Download link

You can use any command line download manager such as apt-get or yum to download ttyrec,ttyplay and ttytime. Ubuntu users can also download and install these tools through the Ubuntu Software Center.

Advantages

Lightweight and easy to use

Can record a variety of popular command line tools such as vi,nano,lynx

There is no learning curve.

Shortcoming

Can't work under IRIX6.4. )

Dependent on terminal size

Most Linux distributions are not pre-installed.

The above is all the contents of the article "how to use ttyrec and ttyplay commands in linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report