---------------------------------------------------- Exercise #3 for DAT2330 - Ian Allen - idallen@ncf.ca ---------------------------------------------------- Global weight: 1% of your total mark this term Due date: 23h59 (11:59pm) Friday, January 31. Cutoff date: I will accept without penalty exercises that are submitted before 17h00 (5pm) on Sunday, February 2. After that late-submission date, the exercise is worth zero marks (but it must still be completed - see the course outline). The deliverables for this exercise are to be submitted online on ACADUNIX using the "submit" method described below. No paper; no email; no FTP. Exercise Synopsis: Work on ACADUNIX. Fetch a compressed GNU tar file. Unpack it. Follow enclosed directions. Create several files containing different information. Submit the files for marking on ACADUNIX. Where to work: Do your Unix command line work on the ACADUNIX computer. Login via "telnet" or (preferred) "ssh" (use the PuTTY program). The files you work on will remain on ACADUNIX even after you log off. 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. Exercise Details: 1) Create an empty directory in your account on ACADUNIX and cd into it. Make sure there are no files in this new, empty directory. 2) Put a copy of your Exterior Assignment Submission Label into a file named "file1.txt" in this empty directory. Use the exact 7-line (plus optional comments) format described online and in previous exercises. (Make sure your file1.txt file has at least seven lines in it.) 3) Copy the file "secret.tar.gz" into the current directory (the directory containing file1.txt) from under the ACADUNIX teacher directory: /thome/alleni/course/dat2330/03w/ File secret.tar.gz is a compressed GNU "tar" archive containing many other files. Your job is to find a compressed text file inside this tar file and decode its contents. There is a README.txt file in the tar archive that tells you how to do this. The tar archive contains many other "decoy" files to hide the real file. Part of your work will be finding and identifying the real file. NOTE: All the compressed files in this exercise use the gzip/gunzip compression method. (Do not use the old "compress" or "uncompress" commands mentioned in your textbook.) To find, decrypt, and restore the text file, continue to follow these steps: 4) Into the current directory (the one containing file1.txt), unpack everything from inside the secret.tar.gz compressed tar archive using the following GNU tar command line: $ /usr/local/bin/tar -xzf secret.tar.gz Use the above command line to unpack the file on ACADUNIX; do not copy the "tar" line from your textbook in Chapter 3. Make sure there are no errors issued by the "tar" command! Contact your instructor if you get any errors. NOTE: The native IBM "tar" command on ACADUNIX will not work to unpack this archive; it will say: tar: illegal option -- z On ACADUNIX, you must use an alternate GNU-compatible "tar" command via the full pathname "/usr/local/bin/tar" - see Chapter 3. After unpacking the tar file without errors, you should find a file named README.txt in the current directory. You should also find a new directory named ".secret" in the current directory. (Reminder: names beginning with periods are "hidden" or "invisible" names; they need special options to be seen.) If there were no errors, remove your copy of the secret.tar.gz file. In the current directory you will be left with two file names (README.txt and file1.txt) and one hidden directory name (.secret). 5) Read the README.txt file that you just unpacked and follow the rest of the directions. (You may need to adjust the permissions on the unpacked README.txt file so that you can read it.) The README.txt file will tell you how to complete the exercise. You may use ssh or telnet to connect to ACADUNIX several times, so that you have several windows in which to work on this exercise. (This will be useful so you can read the README.txt file in one window and type commands in another window.) If you have problems: see me in a lab, post questions to the discussion news group, or make an office appointment with me.