Get the App
SLTechnology News&Howtos  ›  Servers  › 

Example Analysis of FAQ commonly used in ubuntu operating system

Shulou Source: shulou.com Published: 2022-06-01 18:27:47 10月30日 Update

This article mainly introduces the example analysis of FAQ commonly used in ubuntu operating system, which is very detailed and has certain reference value. Friends who are interested must finish it!

1. Record how ubuntu server views the crontab log

Crontab logging

Modify rsyslog

Sudo vim / etc/rsyslog.d/50-default.conf

Cron.* / var/log/cron.log # removes the commentator before cron

Restart rsyslog

Sudo service rsyslog restart

View crontab Log

Less / var/log/cron.log

II. Ubuntu resets the default editor of crontab-e

Ubuntu System Admin set up scheduled tasks on the first-line server, accidentally chose nano, because the previous contact is redhat series, not accustomed to using nano, so want to reset, look up on the Internet, there seems to be no.

In desperation, I reinstalled a server to test and found that when you first crontab-e choose the editor, it will remind you that if you want to change your choice in the future, enter select-editor alas, it is still not careful enough. Sudo select-editor chooses vim to do it.

Root@ubuntu:/var/www# select-editor

Select an editor. To change later, run 'select-editor'.

1. / bin/ed

2. / bin/nano

Tags: Select file content log operating system common use example system analysis two server article editor script service careful first line not enough host value Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB macOS MySQL Xiaomi vpn