Linux Cmd Tool series-script & amp; scriptreplay, toolscript

Source: Internet
Author: User

Linux Cmd Tool series-script & scriptreplay, toolscript
Intro

Sometime we want to record cmd and outputs in the interactive shell sessions. However history cmd cannot do this. So we need cmd line recording tool likeScript AndScriptreplay.

References

Master's Shoulder: How to Record and Replay Linux Terminal Sessions using 'script' and 'scriptreplay' Commands

Key Points
script cmdhist.log

This starts the script recording process, which underlyingly is spawning a new shell, all successive cmds you type is in the new shell.

exit

This exits the new shell created by script cmd.

script --timing=time.log cmdhist.log

This will populate another time. log file that keeps the timestamp of each historical cmd step.

To replay such cmdhist. log, you need time. log and scriptreplay cmd.

scriptreplay --timing=time.txt script.log

 

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.