From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10872d,d4c1f7c0fe672a4 X-Google-Attributes: gid10872d,public X-Google-Thread: 1070f0,d4c1f7c0fe672a4 X-Google-Attributes: gid1070f0,public X-Google-Thread: 1164f8,d4c1f7c0fe672a4 X-Google-Attributes: gid1164f8,public X-Google-Thread: fcda7,d4c1f7c0fe672a4 X-Google-Attributes: gidfcda7,public X-Google-Thread: 1020c6,d4c1f7c0fe672a4 X-Google-Attributes: gid1020c6,public X-Google-Thread: 111731,d4c1f7c0fe672a4 X-Google-Attributes: gid111731,public From: Thomas Tornblom Subject: Re: Different UNIX pro's and con's. Date: 1998/09/18 Message-ID: #1/1 X-Deja-AN: 392502244 References: <35F71814.1E0B911C@iakom.com> <35FDE4C4.83878B2A@home.com> <35FF02B1.D5890477@home.com> <6tovb9$rs4$1@enterprise.nssl.noaa.gov> <3601DE1E.B03FA547@home.com> Organization: Sun Microsystems Newsgroups: comp.unix.advocacy,comp.unix.admin,comp.sys.hp.hpux,comp.sys.sgi.admin,comp.sys.sun.admin,comp.sys.dec "Rev. Don Kool" writes: > > If "/tmp" fills up, write a cron job that cleans out files older than a > > certain date. Rebooting because /tmp fills up is an indication of either > > a lack of knowledge of UNIX, or just plain laziness! > > echo '0 2 * * 6 find /tmp -atime +7 -exec rm {} \; > > /var/adm/remlist.txt' >> /var/spool/cron/crontabs/root > > echo "0 2 * * 6 reboot" >> /var/spool/cron/crontabs/root > > Notice the difference in the number of keystrokes required? > >From "man crontab": The following options are supported: -e edit a copy of the current user's crontab file, or creates an empty file to edit if crontab does not exist. When editing is complete, the file is installed as the user's crontab file. If a user- name is given, the specified user's crontab file is edited, rather than the current user's crontab file; this may only be done by a super-user. The environment variable EDITOR determines which edi- tor is invoked with the -e option. The default editor is ed(1). Note that all crontab jobs should be submitted using crontab ; you should not add jobs by just editing the crontab file because cron will not be aware of changes made this way. Read and understand the last sentence. -- Thomas Tornblom Tel: +46 8 623 9100 E-mail: Thomas.Tornblom@Sun.SE Sun Microsystems AB Fax: +46 8 623 9102