Hey there, Terminal Warriors!
You've made it through the core commands: mkdir
, touch
, cat
, rm
, cp
, and mv
. Now it’s time to apply them all together in a practical challenge that'll push your command-line confidence to the next level.
This challenge is meant for RHEL 9 learners following my series — but anyone who loves some good terminal automation fun can jump in!
Challenge Brief
You're asked to quickly organize a project workspace for a small dev team.
Here’s what needs to be done:
📝 Task Overview
- Create a project directory named
team_alpha
. - Inside it, create the following structure:
team_alpha/
├── docs/
├── src/
│ ├── frontend/
│ └── backend/
├── tests/
- Inside
docs/
, create 3 files:README.md
,CONTRIBUTING.md
, andLICENSE
. - Inside
src/frontend/
, create files:index.html
,style.css
. - Inside
src/backend/
, create files:app.py
,requirements.txt
. - Append a line of dummy content to
README.md
andapp.py
. - Rename
README.md
toREADME_MAIN.md
. - Copy
requirements.txt
to the mainteam_alpha/
directory. - Delete the
tests/
directory.
Full Solution Walkthrough
# Step 1: Create the base project directory
mkdir team_alpha
# Step 2: Create nested structure with -p (recursive flag)
mkdir -p team_alpha/docs team_alpha/src/frontend team_alpha/src/backend team_alpha/tests
# Step 3: Create files in docs/
touch team_alpha/docs/README.md team_alpha/docs/CONTRIBUTING.md team_alpha/docs/LICENSE
# Step 4: Create files in frontend
touch team_alpha/src/frontend/index.html team_alpha/src/frontend/style.css
# Step 5: Create files in backend
touch team_alpha/src/backend/app.py team_alpha/src/backend/requirements.txt
# Step 6: Add dummy text to README.md and app.py
echo "This is the README file." > team_alpha/docs/README.md
echo "# Python App" > team_alpha/src/backend/app.py
# Step 7: Rename README.md
mv team_alpha/docs/README.md team_alpha/docs/README_MAIN.md
# Step 8: Copy requirements.txt to the root of the project
cp team_alpha/src/backend/requirements.txt team_alpha/
# Step 9: Delete the tests folder
rm -rvf team_alpha/tests
🧠 What You Just Practiced
Command | Purpose |
---|---|
mkdir -p |
Creates nested directory structure |
touch |
Creates empty files |
echo > |
Writes dummy content to files |
mv |
Renames a file or moves it |
cp |
Copies a file |
rm -rvf |
Deletes a folder and everything inside, recursively |
Mini Challenge
Take it up a notch! Add a script that automates the above setup, but accepts the project name as an argument.
Hint:
#!/bin/bash
project_name=$1
# Use "$project_name" in place of team_alpha above
Want me to help you with the script version? Let me know in the comments 👇
Keep Practicing
Every time you build something small like this, you're building muscle memory. Try modifying this structure to suit different projects — and see how fast you get with automation!
Tags:
#linux
#redhat
#rhcsa
#techwithengineers
#techtransition
#learnlinux
#devops
#linuxlab
#cloudwhistler
#30daychallenge
#opensource
#techjourney
Top comments (0)