Hey, fellow tech explorers! ๐ Day 5 of the DevOps journey is in full swing, and today's dive into the tech ocean was nothing short of exhilarating. Let's break down the highlights!
Unveiling the Magic of Containers ๐ณ
Have you ever pondered the mystery behind the sudden appearance of 90 sub-directories in a directory? It wasn't the result of a manual marathon; instead, it unfolded with the elegance of a one-liner wonder:
mkdir day{1..90}
Yes, 90 directories in seconds, thanks to the power of shell scripting and the creative use of curly braces! ๐ฒโจ
Task 1: Creating Dynamic Directories with Shell Scripting
Inspired by the magic of one-liners, I decided to script my own directory creation extravaganza. Enter the createDirectories.sh
script:
./
createDirectories.sh
day 1 90
And just like that, 90 dynamic directories named day1, day2, ...day90 emerged, ready to be filled with future tech wonders.
Task 2: Safeguarding Progress - The Backup Script ๐ก๏ธ
DevOps wisdom teaches us the importance of backups, and today, I crafted my backup script (backupScript.sh
). With a simple execution:
All my hard work was safely duplicated in a timestamped backup directory. The safety net for tech adventures! ๐๐
Task 3: Automating Backups with Cron
To add a touch of automation, I scheduled my backup script with Cron. Now, like clockwork, my system will create backups at 2 AM daily:
0 2 * /path/to/
backupScript.sh
Effortless backups while catching those Zs. ๐ด
Task 4: User Management - Welcoming New Faces ๐ฅ
In the realm of user management, I introduced two fresh faces:
sudo adduser user1
sudo adduser user2
Their usernames? A simple display command revealed the mystery:
cut -d: -f1 /etc/passwd | grep -E '^user1$|^user2$'
Two new members added to the tech family! ๐ฅ
Wrapping Up Day 5
Day 5 of the DevOps journey was a whirlwind of containers, backups, and user management. Each task brought a new layer of understanding to the intricate world we navigate. What a ride! ๐ข๐
Keep the fire burning! ๐ฅ๐ป