Name: ____________________________

MidTerm -- CS 302

Init

  1. How do you change to runlevel 2? assume you have root privliges ______________________
  2. What does runlevel 6 due? _______________________________

Files and Filesystems

  1. (True/False) You need read permission to execute a binary file. In other words, you need read permission on /bin/ls to run /bin/ls.
  2. Which filenames will get mached by the file pattern "?[A-z]*4*"
  3. bush_stinks        kerry4ever  ihatebush    kerryAwinner    4kerry4winning      
  4. What command will tell you how much free disk space you have? ______________
  5. Suppose you type 'ls' and see the line below.  
    -rw-r--r--   1 pres    staff       10630 Feb 14 15:50 nukeRussia.exe
    Who can read the file? _________________________________________________
    Who can write to the file? ______________________________________________
    Who can run the program? _____________________________________________
  6. I have a softlink such that 'edwards' is linked to 'vp'.  The file 'vp' uses 100 G of disk space.
    1. Total space used is about 100G.
    2. Total space used is about 200G.

Command Line

  1. What command would rename a file "bush" into a file "pres"? ___________________________________________
  2. What command will tell me if the disk is full? _________________________________
  3. What command will copy a file name "ossama" into a new name "terrorist"?
    _________________________________________________________
  4. How do I search for all lines in the file "votes" containing "nader"?
    _______________________________________________________________________
  5. How do I get help on the command cpio? _____________________________________

Processes and Signals

  1. How do I find out what processes are running on my computer (ALL PROCESSES)? ________________
  2. How do I kill process number 47? __________________________________

NFS and SAMBA

  1. Add to /etc/fstab (as shown below) to automatically mount hillary.nmu.edu's /votes/senate directory onto the local directory /senators on every reboot from now on.
  2. /dev/sda1           /              ext2         rw       0 0
    /dev/sda2 /WEENIE_DOS dos rw 0 0
    __________________________________________________________________________
  3. Add another line to mount the user mccain home directory from the machine mccain.nmu.edu onto your machine.  That user has no password.
    ___________________________________________________________________________
  4. (Worth zero points) Name the last president to win with less than 50% of the vote?
  5. (Yes/No) Can you access an NFS mounted directory without a network connection?

NETWORKING

  1. I can ssh to any machine in the world except www.whitehouse.com.  The site www.whitehouse.com receives ssh requests from other people, but not me.  Give me something to check to help solve this problem.
    _____________________________________________________________________
  2. (Yes/No) Should web pages to be shown to the world be owned by the user 'apache'?
  3. What happens if ServerRoot points to a directory that does not exist?
    1. Every client sees an error page
    2. The server don't start (kinda like Bush's brain)
    3. Everything runs fine, though there is a warning shown on the server's boot screen.
    4. Kerry stinks.
    5. Clients can see all web pages except the main page.  If the machine is www.chaney.com, then users can see http://www.chaney.com/~chaney but not http://www.chaney.com
  4. Someone has looked at 100 pages on my site.  Each page view was the user looking at a new page he'd never seen before.  How many entries are there in my web log?
    1. Probably zero
    2. Exactly 100
    3. At least 100
    4. Chaney will be a great V.P.

NEW USER ACCOUNTS

How do you make a new user account? This is worth three points. partial credit is very possible, so if you only know part of the answer, try anyway.


  1. _________________________________________________________________________________
    _________________________________________________________________________________
    _________________________________________________________________________________
    _________________________________________________________________________________
    _________________________________________________________________________________
    _________________________________________________________________________________