Day5 of #90daysofdevops | Advanced Linux Shell Scripting for DevOps with User management
- You have to do the same using Shell Script i.e using either Loops or command with start day and end day variables using arguments -
So Write a bash script createDirectories.sh that when the script is executed with three given arguments (one is the directory name and the second is the start number of directories and the third is the end number of directories ) it creates a specified number of directories with a dynamic directory name.
Create a Script to back up all your work done till now.
Read About Cron and Crontab, to automate the backup Script
(A) Cron:
Cron is a daemon that runs in the background and checks the system clock every minute to see if there are any scheduled tasks to execute.
It reads the crontab files to determine the schedule and command for each task.
Cron is responsible for launching the scheduled tasks at the specified times or intervals.
(B) Crontab:
Crontab is a command-line utility that allows users to create, edit, and manage their cron job schedules.
Each user can have their crontab file that contains their scheduled tasks.
Crontab files follow a specific format where each line represents a separate cron job.
Each line in the crontab file consists of six fields that define the schedule and command for the task to be executed.
Read about User Management and Let me know on Linkedin if you're ready for Day 6.
A user is an entity, in a Linux operating system, that can manipulate files and perform several other operations. Each user is assigned an ID that is unique for each user in the operating system. In this post, we will learn about users and commands which are used to get information about the users. After installation of the operating system, the ID 0 is assigned to the root user and the IDs 1 to 999 (both inclusive) are assigned to the system users hence the ids for local user begins from 1000 onwards.
Create 2 users and just display their Usernames
Reference article - https://www.geeksforgeeks.org/user-management-in-linux/A user is an entity, in a Linux operating system, that can manipulate files and perform several other operations. Each user is assigned an ID that is unique for each user in the operating system. In this post, we will learn about users and commands which are used to get information about the users. After installation of the operating system, the ID 0 is assigned to the root user and the IDs 1 to 999 (both inclusive) are assigned to the system users hence the ids for local user begins from 1000 onwards.
In a single directory, we can create 60,000 users. Now we will discuss the important commands to manage users in Linux.
New 2 users by name - rahulT and shubhamL are added.
Thanks for reading the blog & do share them with someone in need :)
Please share your views and suggestions, they are always welcome.
See you then in the next blog.
Happy learning :)