In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "how to operate screen recording in the command line of Linux". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to operate screen recording on the command line of Linux.
Script and scriptreplay are available in most GNU/Linux distributions. Script is used to record the screen session to a file, and scriptreplay is used to play back the recorded screen session. Let's take a look at how it is implemented:
We can start by recording the screen session like this:
The code is as follows:
$script-T2 > timing.log-an output.session
$type commands; # now, as we usually do, enter whatever you want, as if nothing had happened.
.
.
Exit # may type N multiple commands, and if you think that's all you need to record, type exit to end it.
Description: the above two configuration files (timing.log, output.session) are passed to the script command as parameters, in which the timing.log file is used to store the time message of each command to run, and the output.session file is used to store the command output (in fact, the screen output). -t is used to dump to stderr the time data, so it is certainly customizable to redirect stderr to timing.log,timing.log and output.session with 2 >.
In the same path, we can use these two files to play back and forth the screen session:
The code is as follows:
$scriptreplay timing.log output.session
....
.... # here is what needs to be output.
Very simple, in addition, we only need to share these two files with others, and others can watch this "video". Of course, the deficiency is that there is no sound, but there is a considerable advantage that the files will be quite small and suitable for transmission on the Internet.
Next we will see how to achieve real-time broadcasting under the command line, this method is particularly suitable for teaching, and absolutely fluent.
First open two terminals,terminal1 and terminal2.
1. Enter the following command on terminal1:
The code is as follows:
$mkfifo scriptfifo # filename can be customized
2. Enter the following command on terminal2:
The code is as follows:
$cat scriptfifo # of course find the right path
3. Go back to terminal1 and enter the following command:
The code is as follows:
$script-f scriptfifo
$type commands
$.
$. # you may enter N multiple commands. When you do not need to broadcast, type exit and enter enter.
At this point, I believe you have a deeper understanding of "how to operate screen recording in the command line of Linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.