CS 240, Assignment 05
10 points
Complete by Wednesday, 30.Jan, 01:00 p.m.
Below you are asked to perform various Unix operations, and capture the output
to a script file. We have done or discussed most of the neccessary operations
in class, and they all are covered in the "Just Enough Unix" textbook.
Before starting scripting, you should review the steps to be sure you know
what the correct command is.
Do the following operations as described below, capturing the output to a script
file (typescript default is ok) and enscript-ing the resulting file.
- start scripting
- ensure your are in your current login directory (cd or cd ~)
- list the files in your home (top-level) directory using a command which
distinguishes between files and directories, as well as showing the dates,
size, and protections of the files
- list all the files in the directory containing Assignment 02 (the one
which printed "Hello your-name .")
- list only the files with the .java extension in
the directory containing Assignment 02
- create a sub-directory off your home directory called practice
- copy /academic/cs2/naminghosts to this new directory
- show the word count of the naminghosts file
- 'cd' to your home directory, and use the same command to list the files
that you used in #3 above, except this time redirect the output to a file
called dir in your practice
sub-directory
- do the 'head' and 'tail' commands on the dir file
- sort the dir file by file size (skipping leading
blanks in the file size field) and redirect the output to a file called dirsize
in the practice sub-directory
- do a 'cat' on the dirsize file
- exit scripting
- enscript the typscript file you just created