Day 8 - Logs and Text Processing in Linux
grep, cut, awk, sed, less, tail, and head in action

On Day 8, I explored the powerful world of Linux log files and text processing commands. These are essential for DevOps, sysadmin tasks, debugging, and automation.
π What I Learned Today
πΉ Working with Logs
Viewed and followed log output:
tail -f /var/log/messages tail -f /var/log/yum.log less +F yum.logNavigated configuration files:
grep -i firewall anaconda-ks.cfg grep -R SELINUX /etc/* vim /etc/selinux/configText Exploration Tools
Viewers:
cat,less,more,head,tailSearch & Filter:
grep -i firewall anaconda-ks.cfg
grep -R selinux /etc/
Field Extraction:
cut -d: -f1 /etc/passwd # usernames cut -d: -f3 /etc/passwd # UIDs awk -F':' '{print $1}' /etc/passwdText Manipulation with
sedEdited files inline:
sed -i 's/coronavirus/covid19/g' samplefile.txt sed -i 's/covid19/nothing/g' samplefile.txtKey Learnings
How to monitor live log output (
tail -f)Use
cut,awk, andgrepto extract structured textAutomate bulk text replacements with
sedInvestigated system config files (
/etc/passwd,anaconda-ks.cfg, SELinux configs)
π§ This knowledge will help in:
Reading audit logs
Debugging boot issues
Managing users and services
Automating file edits in pipelines




