Category: Linux

How to Run Crontab Every Second

How to Execute Cron Jobs Every Second in Linux
銆€銆€Many times, our scheduled tasks need to run with second-level precision, but Linux only supports scheduling down to the minute by default. Most built-in versions of Linux don’t natively support second-level execution. Using sleep makes it easy to execute tasks by the second.

1. The sleep format is as follows:
sleep 5 …

Installing Chinese Language Pack and Fonts on Linux

I. Installing Chinese Support on the System

1. Install Chinese language pack:
yum -y groupinstall chinese-support
2. Modify character encoding configuration file
vi /etc/sysconfig/i18n
Enter:
LANGUAGE=”zh_CN.GB18030:zh_CN.GB2312:zh_CN”
SUPPORTED=”zh_CN.GB18030:zh_C …

How to Install EPEL Repo on CentOS 5/6

Sometimes, to quickly install a piece of software, we have to use the yum method, but it can be frustrating when the yum package isn’t found. Below, we’ll install EPEL to add a yum repository and fix this:

Using CentOS as an example, here is the installation method:
CentOS 6 32-bit: rpm -ivh http://dl. …

How to Fix Shell Script Failing in Crontab While Running Manually

Today while performing a system directory file backup, I encountered a problem: a .sh script file could be executed manually, but when added to a scheduled task, it would exit after compressing the backup file to a certain size.
After searching online, I finally found the answer. The solution is as follows:
The script file in my original crontab was like …

Crontab Basic Usage Guide

crontab is a commonly used scheduled task tool in the system. Below we will explain its usage:
1. Edit directly with the crontab command
The cron service provides the crontab command to configure the cron service. Here are some parameters and explanations for this command:
crontab -u //Set up cron service for a specific user, …

How to Change System Time in Linux

The command format is:
date -s time-string
For example, to only modify the system date without changing the time (hours, minutes, seconds)
date -s 2016-03-16

Or to only modify the time without changing the date
date -s 10:08:00
Of course, you can also modify both date and time simultaneously
date -s "2016-03-16 04:53:00" …