• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

How to record a video of Terminal activity on Linux with a script

AnonyViet by AnonyViet
January 10, 2023
in Network
0

Script command lets you go back to Video on Terminal and replay your commands. This article will come in handy when you want to create a reference of the steps you’ve taken, or you’re creating a guide for others to follow.

Join the channel Telegram of the AnonyViet 👉 Link 👈

How to spin Terminal on Linux with script

The script will output a formatted copy of all the commands you have run. It works by going to a sub-shell that records everything you do. The session will be saved as plain text when you exit the shell. This makes Script more reliable than redirected input streams.

Basic usage

Load Script command

The script command can be run without any parameters:

script

A new recording session will begin. Your terminal recording session will be saved to ./typescript. You can specify a different file by giving the script another parameter:

script example_session

Use the shell to execute the sequence of commands you want to record (return). When done, press Ctrl + D or type exit to exit the sub-shell. You will be back in your main shell session.

Now you can check the generated session log:

cat example_session

You’ll see your command interspersed with comments in square brackets. These comments are used by the script to record details about the terminal itself and the events occurring within it.

Since log files are plain text, you are free to modify them in a text editor.

This will be very useful if your session accidentally exposes sensitive information or you want to remove extraneous characters from the log. The script logs everything that happens in your terminal, including backspace keys, newlines, and control characters, some of which may not be necessary.

Add to an existing file

You can add other parameters to “pause” and “resume” command dialing by exiting the sub-shell and starting a new session.

Add the -a parameter to append commands to the specified file. The script will overwrite the contents of the file without this parameter.

script -a example_session

Add time data

Run the script with the -t parameter to specify a path to save the time. Time files are in a two-column format of data. Each entry contains the elapsed time since the last record in the first column. The second column records the number of characters that have been entered, allowing for accurate input speed playback.

script -q -t example_session_timings example_session

Terminal session playback

The scriptreplay command reads the output script’s data to your terminal. Timing data will be used to match each entered character. As if you will see the terminal enter commands automatically, which are recorded by the script.

scriptreplay -t example_session_timings example_session

Some recordings may have a lag that is not what you want or run at a very slow speed. Use the -d parameter to speed up the output.

# Chạy nhanh hơn 4 lần
scriptreplay -d 4 -t timings typescript

You can also use the -m parameter to limit the maximum delay. The next command will be entered up to 2 seconds.

# Độ trễ tối đa 2 giây
scriptreplay -m 2 -t timings typescript

Use with interactive commands

You should not use scripts with highly interactive commands. Script is focused on capturing text-based output, not commands that control your terminal. The script is not suitable for use with non-interactive shells.

Other choices

The -c parameter to the script allows you to specify a command. When this mode is used, the script runs the command and logs its output, instead of creating a new shell. This can be more efficient in capturing output data.

The -f parameter instructs the script to write directly to the session log after each event. This improves safety by ensuring output is recorded immediately.

The script’s manual page also states that this parameter can also be used to monitor the user’s terminal in real time.

Scripts generally do not accept a symlink as a path. The –force parameter allows to overcome the above situation.

summary

script allows you to record your Terminal commands into plain text files with exact time each command. You can check, share and replay them in your terminal using scriptreplay.

For best results, run the scriptreplay command in the same Terminal session that you used with the script.

Alternatively, you can also use These 5 tips to decorate the Terminal interface.

The article achieved: 5/5 – (100 votes)

Tags: activityLinuxrecordscriptTerminalvideo
Previous Post

How to Download Videos from Instagram

Next Post

Lesson 184: How to use the Forecast function in Excel

AnonyViet

AnonyViet

Related Posts

Script backup database and website on telegram
Network

Script backup database and website on telegram

May 2, 2025
Create 64GB RAM 16 core for free on Google IDX
Network

Create 64GB RAM 16 core for free on Google IDX

April 13, 2025
What is VPS running Vietnamese software? What is the reason for installing Vietnamese software on VPS?
Network

What is VPS running Vietnamese software? What is the reason for installing Vietnamese software on VPS?

February 17, 2025
Create Ronin wallet to play pixels on VPS Windows
Network

Create Ronin wallet to play pixels on VPS Windows

February 17, 2025
What is Proxy Gradient Network? Instructions for using Proxy to suspend multiple Gradient accounts
Network

What is Proxy Gradient Network? Instructions for using Proxy to suspend multiple Gradient accounts

December 26, 2024
How to buy a .news domain for free for 0 VND at Namecheap
Network

How to buy a .news domain for free for 0 VND at Namecheap

December 22, 2024
Next Post
Lesson 184: How to use the Forecast function in Excel

Lesson 184: How to use the Forecast function in Excel

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments

Recent News

Discover Supermix – Smart playlist on YouTube Music

Discover Supermix – Smart playlist on YouTube Music

May 20, 2025
The 10 best Torrent websites today – 100% still operate

The 10 best Torrent websites today – 100% still operate

May 20, 2025
Share Code Shop Selling Acc game extremely lightweight written in bootstrap

Share Code Shop Selling Acc game extremely lightweight written in bootstrap

May 19, 2025
Instructions for downloading all photos and story from Instagram

Instructions for downloading all photos and story from Instagram

May 19, 2025
Discover Supermix – Smart playlist on YouTube Music

Discover Supermix – Smart playlist on YouTube Music

May 20, 2025
The 10 best Torrent websites today – 100% still operate

The 10 best Torrent websites today – 100% still operate

May 20, 2025
Share Code Shop Selling Acc game extremely lightweight written in bootstrap

Share Code Shop Selling Acc game extremely lightweight written in bootstrap

May 19, 2025
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Discover Supermix – Smart playlist on YouTube Music

Discover Supermix – Smart playlist on YouTube Music

May 20, 2025
The 10 best Torrent websites today – 100% still operate

The 10 best Torrent websites today – 100% still operate

May 20, 2025
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET bongdaso

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

©2024 AnonyVietFor Knowledge kqxs hôm nay xem phim miễn phí SHBET bongdaso