COP 4343 Unix® System Administration
(Spring 2008
)
The Lucky 13 Task List
- 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.
- 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);
- 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. )
- 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.
- If /tmp/manifest.txt exists, print the first (or last) twenty
(20) [or any other number designated] lines of it to standard out.
- If /tmp/manifest.txt exists, print all filenames with a '#' in
the filename.
- 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.
- 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.
- 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).
- Of all processes running, what are the first (or last) 6 (or any
other number designated) that belong to root?
- Of all processes running, what are the first (or last) 6 (or any
other number designated) that DO NOT belong to root?
- Find the number of occurrences of a named process (with tolerance
of +/- 1 )
- 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.