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. Displaying current variables. Say, to display the value of PATH environment variable (command export).
  4. 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
    
  5. man grep, man sort, man more, man head, man tail
  6. What is the relative pathname?
  7. 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.

Cem Ozdogan 2010-02-18