Table of contents: |
๐ Task - 1: Create Multiple Directories by Passing Arguments ๐๐ |
๐ Task - 2: Script to Backup Your Work ๐๐พ |
๐ Task - 3: What are Cron and Crontab ๐ฐ๏ธ๐๏ธ |
๐ Task - 4: User Management in Linux ๐ฅ๐ง |
๐ Task - 5: Creating Users and Displaying Usernames ๐ค๐ค |
๐ Introduction
This blog will cover the automation of creating multiple directories, the process of taking backups using cron jobs, and the management of users in Linux.
๐ Task - 1 Create Multiple Directories by Passing Arguments ๐๐
๐ Task - 2 Script to Backup Your Work ๐๐พ
Output:
๐ Task - 3 What are Cron and Crontab ๐ฐ๏ธ๐๏ธ
The crontab is a list of commands that you want to run on a regular schedule, and also the name of the command used to manage that list. It allows users to schedule tasks or commands to run at specific intervals or at predefined times. These scheduled tasks are referred to as corn jobs.
View Root Crontab entries : Login as root user (su โ root) and do crontab -l.
To view crontab entries of other Linux users : Login to root and use -u {username} -l.
To edit a crontab entries, use crontab -e. By default this will edit the current logged-in users crontab.
Entry in the crontab file to schedule the above script for daily execution at 11:30. /dev/null This refers to the null device, and writing to it is a way to discard the output.
๐ Task - 4: User Management in Linux ๐ฅ๐ง
User management in Linux involves creating, managing, and controlling user accounts on the system. Each user account represents a separate identity that can access the system's resources, files, and applications.