60 Days DevOps Challenge: Day 1


Challenge 1: List all files (including hidden ones) in your home directory and sort them by modification time.
ls -laht
Challenge 2: Create a directory named devops_challenge_day_1
, navigate into it, and create an empty file named day1.txt
mkdir devops_challenge_day_1
cd devops_challenge_day_1
touch day1.txt
Challenge 3: Find the total disk usage of the /var/log
directory in human-readable format.
du -sh /var/log
Challenge 4: Create a new user called devops_user
and add them to the sudo
group.
sudo useradd -m -s /bin/bash -G sudo devops_user
sudo passwd devops_user
Challenge 5: Create a group called devops_team
and add devops_user
to that group.
sudo groupadd devops_team
sudo usermod -aG devops_team devops_user
groups devops_user
Challenge 6: Change the permissions of day1.txt
to allow only the owner to read and write, but no permissions for others.
chmod 600 day1.txt
Challenge 7: Find all files in /etc
that were modified in the last 7 days.
find /etc -type f -mtime -7
Challenge 8: Write a one-liner command to find the most frequently used command in your shell history.
history | awk '{CMD[$2]++;} END {for (a in CMD) print CMD[a], a;}' | sort -nr | head -1
Embarking on a 60-day DevOps challenge is a commendable step towards enhancing your technical skills and understanding of DevOps practices. Day 1 has laid a solid foundation by covering essential tasks such as file management, user and group creation, permission settings, and command history analysis. These challenges not only reinforce fundamental Linux commands but also prepare you for more complex tasks in the days to come. As you progress, you'll gain a deeper insight into the DevOps culture, which emphasizes collaboration, automation, and continuous improvement. Keep up the momentum, and you'll find yourself well-equipped to tackle real-world DevOps scenarios.
Subscribe to my newsletter
Read articles from Musaveer Holalkere directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
