Week 2. Assignment: Record a terminal session
When capturing a screen-cast the typical GUI user makes films, generating huge video files which are sometimes not even sharp. The shell user captures his terminal in the terminal itself. The resulting files are thousand times smaller and always sharp!
There are many terminal recording tools available. We will use ttyrec. Just by issuing the command ttyrec it will begin capturing everything that happens in the terminal to a file. To end the capture, type exit. You will find the recording in a file called ttyrecord. To give it a different name, simply provide the name as a parameter. For example:
$ ttyrec mywork.ttyrec [work in the terminal] $ exit exit
Please be careful not to press non-printable characters like arrow keys, page up/down during the recording. They tend to upset ttyrec!
To play back, run:
$ ttyplay mywork.ttyrec
Login to your shell account and first go through the steps given below. Once you are confident capture your work to a file named assignment2.ttyrec. If you still make a mistake, just start ttyrec again with the same file name.
Step 1. Display the system clock time.
Step 2. How many seconds have passed from 00:00:00 UTC of 1 January 1970 to the time you are doing the assignment?
Step 3. Display the output of uptime.
Step 4. Get the values of the environment variables HOSTNAME, HOSTTYPE, USER and HOME.
Step 5. clear the screen.
Step 6. Find the size of your terminal in columns x lines. Hint: resize.
Now exit the ttyrec. Check the recording by running ttyplay. If everything is OK, then write a note in this assignment saying that you have finished the assignment and submit it. You don’t have to upload anything, the supervisor will visit your home directory in the practice computer.
Don't forget to mention your registration number! That is how we'll find your home directory.