next up previous contents
Next: OPERATING SYSTEMS LABORATORY II Up: OPERATING SYSTEMS LABORATORY I Previous: Compiling A Multi-Source C   Contents


Exercises

The UNIX shell is case-sensitive, meaning that an uppercase letter is not equivalent to the same lower case letter (i.e., "A" is not equal to "a"). Most all unix commands are lower case.
  1. Finding out which shell you are using. Use the SHELL environment variable.
  2. Displaying current variables. Say, to display the value of PATH environment variable.
  3. Changing to your home directory.
  4. Changing default access permissions. Use umask, first start with man umask.
  5. Changing access permissions. Change the access permissions of a file or directory.
  6. Analyse of using pipelines (to connect commands);
     $who | wc -l
     $ps aux | grep ozdogan |sort +5 -6|more
     $cat file | head -75 | tail -50
     $grep 'your username' /etc/passwd
    
  7. What is the relative pathname?
  8. To change your password, type the command , using the passwd utility. Here are some rules for selecting a good password:
  9. When you execute a non built-in shell command, the shell asks the kernel to create a new subprocess (called a "child" process) to perform the command. The child process exists just long enough to execute the command. The shell waits until the child process finishes before it will accept the next command. Explain why the exit (logout) procedure must be built in to the shell.

next up previous contents
Next: OPERATING SYSTEMS LABORATORY II Up: OPERATING SYSTEMS LABORATORY I Previous: Compiling A Multi-Source C   Contents
Cem Ozdogan 2009-05-11