Advanced Linux Shell Scripting for DevOps Engineers with User management

Ahmed NisarAhmed Nisar
2 min read

Tasks

  1. 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 create directories.sh that when the script is executed with three given arguments (one is directory name and second is start number of directories and third is the end number of directories ) it creates specified number of directories with a dynamic directory name.

    Example 1: When the script is executed as

    ./createDirectories.sh day 1 90

    then it creates 90 directories as day1 day2 day3 .... day90

    Example 2: When the script is executed as

    ./createDirectories.sh Movie 20 50 then it creates 50 directories as Movie20 Movie21 Movie23 ...Movie50

  2. Create a Script to backup all your work done till now.Backups are an important part of DevOps Engineers day to Day activities The video in References will help you to understand How a DevOps Engineer takes backups (it can feel a bit difficult but keep trying, Nothing is impossible.)

  3. Read About Cron and Crontab, to automate the backup ScriptCron is the system's main scheduler for running jobs or tasks unattended. A command called crontab allows the user to submit, edit or delete entries to cron. A crontab file is a user file that holds the scheduling information.

    this below command takes backup to a specific folder every minute.

  4. Read about User Management and Let me know on Linkedin if you're ready for Day 6.

    1. User Management ๐Ÿ‘จโ€๐Ÿ’ผ is like being the administrator ๐Ÿ‘ฉโ€๐Ÿ’ป of a digital kingdom ๐Ÿฐ, where you have the power to control and manage who can access ๐Ÿšช different parts of your realm. You can create new citizens ๐Ÿ‘ถ(users) and grant them permission ๐Ÿ—๏ธ to perform various tasks within the kingdom. Similarly, you can revoke access or banish ๐Ÿ‘‹ users who misbehave or are no longer needed.
  5. Create 2 users and just display their Usernames

0
Subscribe to my newsletter

Read articles from Ahmed Nisar directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ahmed Nisar
Ahmed Nisar

AWS Devops | Linux | Docker | Jenkins | Terraform | Kubernetes | Ansible |