Linux screen Recording

Source: Internet
Author: User

The Magical script command under Linux
Script is a magical command that can record the session of a terminal and then use Scriptreplay to play the results of its recordings to others. The benefit of script is that all of your actions in the terminal, the commands you've knocked out, and the results you print can be recorded exactly as they are. Can be applied to teaching, demonstration, audit.
In general, script and Scriptreplay have a default installation in the Linux distribution.
Script-t 2>demo.time-a demo.his start recording, Ctrl+d or exit ends
Scriptreplay demo.time demo.his Playback
Two configuration files are treated as parameters of the script command. These two files can be casually named, here with Demo.time and Demo.his. Where Demo.time is used to store timing information and describe when each instruction is run; Demo.his is used to store command information output. The-t option is used to import time series data into stderr. The 2> is used for stderr redirection to Demo.time.

Parameters:
-T indicates the time data for the output recording
-F If you need to output to the log file, you can also view the contents of the log file, you can use the-f parameter. PS: Can be used for teaching, two command line-F can be demonstrated in real time
-a outputs recorded files and appends new content to existing content
-Q To enable the script command to run in silent mode

Use script to record someone's behavior
VI ~/.profilescript-t-f-q 2> $USER. Time-a $USER. His

Application:
1. Demonstration Teaching
First Command box
Script-f Demo
Additional command boxes
Scriptreplay-f Demo
Enables real-time synchronous demos
2. Server Security Audit
Direct operation of the server on the line is a big risk, so it is generally by logging on to the springboard machine, and then connected to the online server, the board can access control and security audit, to view the record of everyone on the online server operation
User home directory, modify environment variables, so that users log on will trigger the recording
VI ~/.profilescript-t-f-q 2>/wow/$USER-$UID-' date +%y%m%d%h%m%s '. Time-a/wow/$USER-$UID-' date +%y%m%d%h%m%s '. His
After this, found that there is a problem is each exit, I am accustomed to ctrl+d, and then press the first time to stop the recording, the second time to user exit, how to resolve the add in the back
If ["$SHLVL" = 1]; Then Exitfi
This allows you to stop the recording and exit the user once ctrl+d.

Play

The message must be in the front, the command message is in the back.


This article from "Wang Xiao Acid" blog, declined reprint!

Linux screen Recording

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.