This is the sixth article in this series, mainly about periodic tasks and Software Configuration Management.
6.1 periodic process
In Linux, the so-called periodic process refers to a series of commands or scripts that run regularly. In short, it is the cron process in the system. This is a daemon. Generally, there are three configuration files for this process in the system:/etc/crontab,/etc/cron. d And/var/spool/cron. Generally, each user's crontab file is stored in the/var/spool/cron directory.
The tasks manually maintained by the system administrator are stored in the/etc/crontab file.
6.2 crontab file format
# Can Be Used to comment on the first column of each line, meaning that there cannot be spaces at the beginning of the line.
The content consists of 6-7 fields, meaning
Minute hour, day month week [user name] command line
Asterisk * indicates that all characters are matched;
An integer indicates exact match;
A dash can be connected to an integer to indicate the value range;
You can also use commas (,) to separate integers or ranges. whitelist matches the listed values.
Let's take a look at several examples:
45 10 ** 1-5 cmd
This example indicates that a command is executed from Monday to Friday at AM.
0, 30*13*5
This indicates the Friday half hour and the 13th half hour of every month.
In cmd, it can be any valid shell command without quotation marks and can contain spaces or tabs.
6.3 command
You need to know several commands about crontab, including: crontab-l outputs the content to the standard output, and crontab-r deletes it, crontab-e allows you to edit a new task.
6.4 Configuration Software
For the system administrator, installing the system and software is essential. However, due to the relationship between the Linux system, this work usually takes much longer than the win system.
For the RedHat system, the software package management tool is obviously rpm. Of course, UBUNTU uses dpkg. For this packaging tool, several common parameters are as follows:
Rpm: -- install -- upgrade -- Erase -- Query
Dpkg: -- install -- remove-l
Of course, the best software package management tool is apt.
Not complete...