CEG 233: Linux and Windows

Winter 2011 // Final Exam // 120 minutes // 100 points

Login and use a Linux PC in the OSIS Lab while answering.  However, this is a closed book, closed notes exam. Surfing is disabled. Do not use pre-existing files.  Do not give or take help during the exam. Man-pages, KDE, konsole, re-booting into Windows or Linux, etc. are available.   Turnin your answers as in  turnin FI answers.txt.

  1. (8*5 points) Full scoring answers for the following need not be longer than five lines.
    1. Assume that d2 is a subdirectory of d1.  Give a command in Linux that moves all the files of d2 into directory d1 unless it would overwrite a file. 
    2. Explain how you would determine if a file is an executable binary file in Linux.
    3. What is the purpose of /etc/resolv.conf in Linux?
    4. Explain how the IP address of a Windows PC can be set/changed.
    5. Windows PS echo and Linux bash's echo are similar in some ways and different in others.  Give one example of their difference.
    6. Write in PowerShell an if statement that would print "Yes" if a file named fnm.txt exists, "No" otherwise.
    7. Give a useful example (other than help) command using net of Windows, and explain its output.
    8. What is an OS boot loader?
  2. (10 points) Develop a bash procedure  that takes an .html file name as the only argument and produces a /tmp/temp.txt file that is the same as the .html file except all tags of the form <whatever> and </whatever> are deleted.
  3. (10 points) Develop a PowerShell function called listAllWithExt that has two parameters: (i) the path name of a directory, (ii) a string that begins with a dot.  The function should list all files with the second argument as an extension in that directory and its subdirectories if any.
  4. (4*10 points) Answer in detail.
    1. Every computer system must have an OS. Defend this view.
    2. Contrast secure delete with ordinary delete.
    3. Describe page faults.
    4. Name and describe any three process states, including the one known as "ready-to-run".
Copyright © 2011 Prabhaker Mateti • Mar 15, 2011