This assignment is due Thursday, March 5 at the beginning of class. Assignments must be stapled. Written homework must be turned in at the beginning of the class period to be considered on time. Print programs using non-proportional type (e.g., Courier) in at least 10 point size. You may use proportional type for answers to questions, but make sure the type size is at least as large as what you are reading (i.e., 12 point). This means that you may not print 2-up. Homework should be turned in on 8 1/2 x 11 paper and must be stapled together. The upper right corner of the first page should contain (a) your name, (b) CS330, (c) the assignment number, (d) the date. If you cannot attend class, written assignments will be considered on time if they are left under my office door provided they are received before class time.

Login to turing.cs.niu.edu or hopper.cs.niu.edu to perform the assigned tasks. Use the "script" utility (see "man script") to record your work in a transcript file. You may edit your transcript files later to include your answers to some of the questions mentioned. Make sure each part (C1, C2, etc.) is labeled on the transcript. Make sure you answer every question, i.e., don't leave it to the TA to figure it out.

Part C. ALIASES

Write the following alias definitions in a text file named "myalias".

C1: Write an alias named "e" which terminates your Unix session.
C2: Write an alias named "ll" which accepts one or more files/directories and list them in long format.
C3: Write an alias named "cx" which accepts one or more files/directories
and adds the execute permission on the specified files/directories.
C4: Write an alias named "pcsl" which accepts one or more files to be printed on the "csl" printer.
C5. Write an alias called "rm" that will display a confirmation message each time you remove a file.
C6: Save your file "myalias".
C7: Execute "myalias" using the "source" command, type: source myalias
You can now test to see if your aliases work and start using them!
C8: Once your aliases work properly, open a transcript file named "A2-PartC".
C9: Display the contents of the file "myalias".
C10: Type the command: source myalias
C11: Type the command: touch x1 x2 x3
ll x[1-3]
C12: Type the following command:
echo "date" > x1
C13: Type the following three commands to test your alias "cx".
cx x1
ll x1
./x1
C14: Type the following commands to test your alias "rm".
rm x2 (make sure you see a confirmation y/n to remove)
C15: Close your transcript file.

Part D. REDIRECTION AND PIPE

D1: Open a transcript file named "A2-PartD".
D2: Redirect the output of the "ls -a" command to a file called "lsfile".
D3: Display the contents of the "lsfile" file.
D4: Redirect the output of the "date" command to the "lsfile" file.
D5: Display the contents of the "lsfile" file. Explain what happened.
D6: Append the ouput of the "finger" command to the "lsfile" file.
D7: Display the contents of the file "lsfile".
D8: Use pipe(s) with the ps and wc (with option l) commands to find out how many processes you are currently running.
D9: Use pipe(s) with the ps (with options -ef) and wc commands to find out
how many processes are currently running on the entire system.
D10: Close your transcript file.