Get the App
SLTechnology News&Howtos  ›  Servers  › 

Linux Note 7 flow control statements, user identity and file permissions.

Shulou Source: shulou.com Published: 2022-06-02 12:06:10 09月13日 Update

Scheduling task service program

1. Schedule tasks at one time

One-time scheduled tasks are performed only once and are generally used to meet temporary work requirements. You can do this with the at command, as long as you write it in the form of "at time". If you want to see an one-time scheduled task that has been set up but not yet executed, you can use the "at-l" command; to delete it, you can use the "atrm task serial number".

2. Periodic scheduled tasks

The command to create and edit a scheduled task is "crontab-e", the command to view the current scheduled task is "crontab-l", and the command to delete a scheduled task is "crontab-r".

If you are logged in as an administrator, you can also add the-u parameter to the crontab command to edit someone else's scheduled task. Orders for minutes, hours, days, months and weeks "

User identity and file permissions.

Useradd command

The useradd command is used to create a new user in the format "useradd [option] username". Groupadd command

The groupadd command is used to create user groups in the format "groupadd [options] group name". Usermod command

The usermod command is used to modify the attributes of the user in the format "usermod [option] username". Passwd command

The passwd command is used to change the user's password, expiration time, authentication information, etc., in the format "passwd [options] [user name]".

5.userdel command

The userdel command is used to delete the user in the format "userdel [option] username".

Tags: Commands users tasks formats user names one-time identity time files permissions information functions parameters periods periodicity passwords attributes serial numbers forms weeks Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Linux MySQL Shulou Information Microsoft