COP 4343 Unix® System Administration (Spring 2008 )

The Lucky 13 Task List

  1. Use the crontab editor to schedule a job to run every five minutes. The jobs should print the current time and show what users are logged in to the system. Remove the job from the crontab after finishing the rest of the tasks and show that it actually did what it was supposed to do.

  2. Find the number of files in the /usr directory tree but not deeper than two layers below /usr (i.e. /usr; /usr/foo; /usr/foo/bar but not /usr/foo/bar/duh);

  3. Find all files in the /tmp directory tree that have modification times within the last 4 hours (or 2 days or any other arbitrary number of minutes, hours, days, weeks, months, years, etc. )

  4. Use xauth to find the auth information for your local X server, then use xauth to set the auth information in a remote shell. The set appropriate the environment variable and demonstrate remote X connectivity by running xclock.

  5. If /tmp/manifest.txt exists, print the first (or last) twenty (20) [or any other number designated] lines of it to standard out.

  6. If /tmp/manifest.txt exists, print all filenames with a '#' in the filename.

  7. Write a script to create a directory /tmp/oldtxtfiles and move all .txt files to /tmp/oldtxtfiles, changing their filename extensions from .txt to .otxt.

  8. Copy all files from /tmp that belong to user jnw (or any other designated userid) to a direcotry of your choice. Delete all those files except .jpg files. List the remaining files.

  9. Write a script that, when given a userid, reports the last time the user logged in. If no userid is provided, print a usage statement (like when you type rm by itself, it prints a usage statement).

  10. Of all processes running, what are the first (or last) 6 (or any other number designated) that belong to root?

  11. Of all processes running, what are the first (or last) 6 (or any other number designated) that DO NOT belong to root?

  12. Find the number of occurrences of a named process (with tolerance of +/- 1 )

  13. Use at to schedule a job to run five minutes from now and store a list of the currently running processes in the file /tmp/plist.