Day 4 of my Linux learning journey was focused on hands-on practice with core file handling and text processing commands that are commonly used in daily Linux, cloud, and DevOps work.
I learned and practiced several new commands today, focusing on how files and text are created, edited, processed, and compared directly from the terminal.
πΉ Writing Output to Files (echo, tee)
To create a file and write content while displaying it on the terminal:
echo "Hello dosto... How are you..?" | tee Myfile.txt
This approach is useful when you want to log output without hiding it from the terminal.
πΉ Editing Files with vi
To modify file content:
vi Myfile.txt
Practiced key vi operations:
- Insert mode (i)
- Save (:w)
- Save & exit (:wq)
- Exit without saving (:q!)
These skills are critical since vi is available on almost all Linux servers.
πΉ Sorting Text Data (sort)
To sort lines alphabetically:
sort Myfile.txt
sort Mail.txt
Commonly used when working with:
- Email lists
- Logs
- Structured text data
πΉ Extracting Specific Characters (cut)
To extract selected bytes from text:
cut -b 1-3 Mail.txt
Helpful for parsing usernames, IDs, or fixed-format text files.
πΉ Comparing Files (diff)
To identify differences between two files:
diff Myfile.txt Mail.txt
This command is widely used for:
- Comparing configuration files
- Auditing changes
- Troubleshooting issues
π Day 4 Key Learnings
- Linux text utilities are powerful when combined
- Small commands solve big problems
- File and text handling is the foundation of cloud & DevOps automation
π Reflection
Day 4 was about confidence through repetition.
Practicing these commands made me more comfortable working directly on the terminalβexactly whatβs needed in real server environments.
On to Day 5 with more Linux learning π§π







Top comments (0)