----------------------- Exercise #1 for DAT2330 due September 3 ----------------------- -Ian! D. Allen - idallen@idallen.ca Remember - knowing how to find out an answer is more important than memorizing the answer. Learn to fish! RTFM! (Read The Fine Manual) Global weight: 1% of your total mark this term Due date: 12:00 noon Wednesday, September 3, 2003. The deliverables for this exercise are to be submitted online on ACADUNIX using the "submit" method described in the exercise description, below. No paper; no email; no FTP. Late-submission date: I will accept without penalty exercises that are submitted before 10h00 (10am) on Friday, September 5. After that late-submission date, the exercise is worth zero marks; but, it must still be completed and submitted successfully to earn credit in the course. Exercises submitted by the *due date* will be marked online and email sent to you after the late-submission date. A sample answer will be posted online after the late-submission date. Exercise Synopsis: This week you will be starting to learn the "vim" text editor. You will use "vim" to create a text file and submit it for marking. The "vim" editor is an enhanced version of the "vi" text editor that appears in all versions of Unix back to about 1980. Typing "vim" at a command prompt will start the editor. Often the command name "vi" is linked to "vim"; but, this is not always true (e.g. on ACADUNIX "vi" and "vim" are different versions!). Note: I will usually refer to "vi" or VI as the name of the editor. You should interpret this to mean "vim", not the old "vi" editor. Where to work: Do your Unix command line work on the ACADUNIX computer. The files you work on will remain on ACADUNIX even after you log off. Do not erase your files; always keep a spare copy of your exercises! WARNING: Do not attempt this exercise on a Windows machine - the text file format is different. You must connect to and work on Unix/Linux. (Note that you may connect to ACADUNIX *from* a Windows machine; however, you may not use the Windows machine itself to do your work.) VI References: Text p.274-283 Unix Resources button (on the course home page) Lecture notes (what I show you on the board!) Exercise Details: 1. Connect to the ACADUNIX computer and log in. Reference: acadunix_help.txt (under the Notes button) 2. Follow the textbook introduction to VI on pages 275-280. Reference: vi_basics.txt (under the Notes button) On ACADUNIX, make sure you always use "vim" and not "vi". 3. Create a file named exercise01answers.txt on ACADUNIX using the VI text editor. For full marks, the spelling of the file name must be exact. At the top of the file, create an Exterior Assignment Submission label following the example you will find under the "Assignment Standards" button on my teaching home page (teaching.idallen.com). For full marks, follow the directions for the label exactly. The label has exactly 7 lines, plus an optional Comments line. The spelling of the label fields on the seven lines must be as shown. Answer these questions in exercise01answers.txt file, underneath your Exterior Assignment Submission label: 4. The College Directive dealing with Academic Discipline (including plagiarism) is number: E______ 5. On ACADUNIX, what is the name of the command that shows your Unix "disk quota"? [Hints: The command name is not the word "disk"! It has a Unix man page (help file), so the command "man xxxxx" will work when you figure out what the command name xxxxx is.] 6. Log in to your account and execute this command on the ACADUNIX computer: $ ls -id $HOME The spelling and case (capital letters) of each word must be exact. What is the output of the above command? 7. On the ACADUNIX computer type the command: $ man ls and use the space-bar to page forward until you find the section entitiled "Flags". What is the given meaning of the "-i" flag? 8. Submission. Submit the exercise01answers.txt file for marking as Exercise 01, using the following ACADUNIX command line (the first character is a tilde): $ ~alleni/bin/submit 01 exercise01answers.txt This "submit" program will copy the selected file to my Exercise 01 directory for marking. Verify that you submitted the file, using this command line: $ ~alleni/bin/submit 01 -l Note that some of the above characters are the digit 1 and some are the letter "l" (lower-case "L"). Do not confuse the two. You may redo this exercise and re-submit your results as many times as you like. I will mark only the most recent submission that is submitted before the final hand-in cutoff date. For Exercise 01, always use "01" as the first argument to "submit".