Name: ____________________________
MidTerm -- CS 302
Init
- How do you change to runlevel 2? assume you have root privliges
______________________
- What does runlevel 6 due? _______________________________
Files and Filesystems
- (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.
- Which filenames will get mached by the file pattern "?[A-z]*4*"
bush_stinks kerry4ever ihatebush kerryAwinner 4kerry4winning
- What command will tell you how much free disk space you have?
______________
- 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? _____________________________________________
- I have a softlink such that 'edwards' is linked to 'vp'.
The file 'vp' uses 100 G of disk space.
- Total space used is about 100G.
- Total space used is about 200G.
Command Line
- What command would rename a file "bush" into a file "pres"?
___________________________________________
- What command will tell me if the disk is full?
_________________________________
- What command will copy a file name "ossama" into a new name
"terrorist"?
_________________________________________________________
- How do I search for all lines in the file "votes" containing
"nader"?
_______________________________________________________________________
- How do I get help on the command cpio?
_____________________________________
Processes and Signals
- How do I find out what processes are running on my computer (ALL
PROCESSES)?
________________
- How do I kill process number 47?
__________________________________
NFS and SAMBA
- 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.
/dev/sda1 / ext2 rw 0 0
/dev/sda2 /WEENIE_DOS dos rw 0 0
__________________________________________________________________________
- Add another line to mount the user mccain home directory from the
machine mccain.nmu.edu onto your machine. That user has no
password.
___________________________________________________________________________
- (Worth zero points) Name the last president to win with less than
50% of the vote?
- (Yes/No) Can you access an NFS mounted directory without a
network connection?
NETWORKING
- 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.
_____________________________________________________________________
- (Yes/No) Should web pages to be shown to the world be owned by
the user 'apache'?
- What happens if ServerRoot points to a directory that does not
exist?
- Every client sees an error page
- The server don't start (kinda like Bush's brain)
- Everything runs fine, though there is a warning shown on the
server's boot screen.
- Kerry stinks.
- 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
- 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?
- Probably zero
- Exactly 100
- At least 100
- 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.
- _________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________