In our lab assignments I'll be asking you to perform various tasks from the command line and report on the results. One easy way to accomplish this task is by creating a transcript of your session. You can capture the input and output (I/O) from a Linux console with the script command. Invoke the script command as follows:
script session1
This copies every
keystroke typed and every character returned to the console in a file
named session1. To stop the transcript, type exit or just enter
<ctrl>-D. This closes the session file and stops "recording"
I/O from the session.
One thing about
transcripts is that they contain a lot of "noise". For
instance, if you first type list and then hit backspace 3 times and
then type s (to correct the list
entry to the proper command ls),
the script file will contain:
list^H^H^Hs
Each ^H is a <ctrl>-H or backspace character, which has the effect of deleting the prior character on the console. EDIT OUT ALL THE NOISE AND "CRUFT" FROM YOUR SESSION FILES. This will make your session files human readable. When it comes to writing your report, only copy the appropriate info from your session into your report. Then describe in your own words what's actually going on with each command. Each lab assignment requires a well-written report on your part, which will include some of the data generated in your sessions. DO NOT SUBMIT ONLY SESSION DATA IN YOUR LAB REPORTS! Your job is to describe what is going on in your session. Interpret the output of the commands for the reader's benefit in your reports.