Managing Systems and Workgroups: A Guide for HP-UX System Administrators

Administering a Workgroup
How To:
Chapter 9888
Popping the Directory Stack
You can avoid retyping long path names when moving back and forth
between directories by using the hyphen (-) to indicate the last directory
you were in; for example:
$ pwd
/home/patrick
$ cd /projects
$ cd -
/home/patrick
Scheduling a cron Job
To schedule a job in cron (as root):
Step 1. Save old /usr/spool/cron/crontabs/root.
Step 2. Edit /usr/spool/cron/crontabs/root.
Add an entry; for example,
0 12 * * * tar cv /work /home >/tarlog 2>&1
takes a tar backup of /work and /home every day at noon.
Here’s how this works (the numbers under the first five fields of the
example are keyed to the explanations that follow):
012***tarcv/work /home 1>/tarlog 2>&1
ABCDE
A = minute
B = hour
C = day of the month
D = month of the year
E = day of the week (0 = Sunday)
An asterisk (*) means all legal values, so the asterisks in fields C, D,
and E mean do it every day of the year. Note that standard output
and standard error are redirected to /tarlog.