Linux System Review Memorandum 6

Source: Internet
Author: User

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...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.