next up previous
Next: About this document ... Up: OPERATING SYSTEMS LABORATORY I Previous: Compiling A Multi-Source C


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. Find out the correct command for the followings:
  1. Changing to your home directory.
  2. Changing access permissions. Change the access permissions of a file or directory.
  3. Finding out which shell you are using. Use the SHELL environment variable (command echo).
  4. Displaying current variables. Say, to display the value of PATH environment variable (command export).
  5. Changing default access permissions. Use umask, first start with man umask.
     who | wc -l
     ps aux | grep 'your username' |sort +5 -6|more
     cat dict | head -5 | tail -3
     grep 'your username' /etc/passwd
    
  6. man grep, man sort, man more, man head, man tail
  7. What is the relative pathname?
  8. 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
Next: About this document ... Up: OPERATING SYSTEMS LABORATORY I Previous: Compiling A Multi-Source C
Cem Ozdogan 2009-07-03