Main index

Introducing UNIX and Linux


Processes and devices

Overview
Processes
      Process status
      Foreground and background
      Process control
      Signals
Environment
      Environment variables
      Global and local variables
      Executable scripts
Program control
      Job control
      Command history list
      Running a job at a specific time
      Running programs periodically
      Big programs
      Timing a program
      Running programs in order
Quotes and escapes
Devices
Backquotes
Summary
Exercises

Exercises

  1. Arrange for a 'Good Morning' message to be mailed to you at 8 am every Monday morning.

    View solution

  2. Arrange for a list of all your files (including 'dot' files) and directories to be mailed to you every weekday at 6 pm.

  3. Arrange for an 'alarm call' message to be written on your terminal in one hour.

    View solution

  4. What is the Process-ID (PID) of your login shell?

  5. Write a script to write your username, your home directory, the type of your terminal, and the printer that lp uses, so the output looks like:
    Your username is chris
    Home directory is /home/ugrad/chris
    You are using a terminal which is a vt100
    The default lineprinter is cs/p1

    View solution

  6. Write a script to prompt you for the name of a directory and then list the files in it.

  7. Set an environment variable called MY_NAME to be your name in the form first name followed by a space followed by family name.

    View solution


Copyright © 2002 Mike Joy, Stephen Jarvis and Michael Luck