fcrontab my.fcrontab(This is like the AT command in Windows.)
This must be done every time the my.fcrontab file is changed./etc/fcron.allow and /etc/fcron.deny can be used to control which users may do this.
You can configure SeaMonkey's mail client to access UNIX mail as follows:
- Click on the mail icon, and if necessary, choose File/New/Account....
- Click the UNIX Mailspool (Movemail) button.
- Continue through the setup dialogs, filling in information as appropriate:
Server Name should be localhost- The Get Msgs tool should load whatever is in your UNIX mail to the SeaMonkey client.
where frequency is, for example, 4m2w3d4h5 (every 4 months, 2 weeks, 3 days, 4 hours and 5 minutes)Note that the command must be in /bin, /sbin, /usr/bin or /usr/sbin. Otherwise, it must be a fully qualified filename. If command is a script, this also holds for any commands it executes.
where "minutes hours dayofmonth month dayofweek" determines when the command is to be executed57 20 * * 7 would cause the job to be run every Sunday at 8:57 PM* * * * 3-3/2 would cause the job to be run every other Wednesday
(every other Thursday would be 4-4/2)
where frequency is one of "hourly, daily, monthly, weekly, nightly" and time is of the form "minutes hours days" (as appropriate)nightly * 2-3 indicates the job should be run every night some time between 2:00 and 3:00 AM
See the section 5 fcrontab man page for more options.
The "$(pipe)" construct is a way to create a string from the output of a pipe of commands. Here, the "wc" command ("word count") returns the number of lines output by the ps command, and the grep command is used to select all of the directories in /proc that correspond to processes.This will create a single log entry every hour noting the number of processes running as reported by both ps and /proc. Should both numbers be the same? Why might this be interesting?
The "2>&1" tells the shell to send stderr to the same place as stdout (which in this case has been redirected to the file /tmp/delete.status).Every night between 2 and 3 AM, this will remove files from /tmp/ which are more than two weeks old.
Records "Car Talk" from WVXU's streaming service each Saturday from 10:00 to 11:00 AM.The "date" command can be used to change or interrogate the date and time (like the separate commands DATE and TIME in Windows). Here it is used to format today's date; below we use it to format yesterday's.If your computer is off during the seasonal time change from/to Daylight Savings Time, you will need to manually change the time and restart ntp:date MMDDhhmmThe hwclock command stores the system time, which the date command changed, into the hardware clock. We do this so that if the system crashes the time will be correct.
hwclock --systohc
/etc/rc.d/init.d/ntp restart
Rotates the system log file on the first of each month at midnight; names the old log file with yesterday's year and month.
Now the command#!/bin/sh #/sbin/logrotate for f in $* ; do mv /var/log/$f.log /var/log/$f.log.$(date -d yesterday +%y%m) touch /var/log/$f.log done /etc/rc.d/init.d/sysklogd restart
logrotate auth boot daemon kern mail sys userwill rotate all of the system logs. Note the "for" command is similar to the FOR command in Windows.
©2014, Kenneth R. Koehler. All Rights Reserved. This document may be freely reproduced provided that this copyright notice is included.
Please send comments or suggestions to the author.