100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Linux & Shell Scripting
30 minbeginner

Files, Directories and I/O Redirection

Files and directories are the fundamental units of organisation in Linux, and every DevOps tool — Docker, Ansible, Terraform, systemd — ultimately reads from or writes to the filesystem. Understanding how Linux represents files, how directories are structured as a tree, and how the three standard streams (stdin, stdout, stderr) flow between commands gives you the mental model behind every shell one-liner and pipeline you will ever write.

I/O redirection is where that understanding pays off operationally. The ability to redirect stdout to a file, pipe stderr to a log aggregator, suppress noise from a cron job, or feed a file as input to a command without modifying the command itself are daily tasks in DevOps scripting. Doing them correctly prevents data loss, avoids log pollution, and makes automated pipelines behave predictably.

This lesson covers file and directory operations through the lens of real deployment tasks — creating release directories, copying configuration files, removing old builds, and capturing command output for audit trails. Each concept is grounded in a scenario from the CricketPulse deployment workflow so the commands feel purposeful, not academic.

Analogy🏏Cricket
🏏 Think of it like cricket: The match itself is the kernel — real computation at the hardware level. The commentators translating that action into words for the audience are the shell: they take raw events and present them in a form humans can understand and interact with. The television set in your living room is the terminal emulator: it displays the commentary but does not participate in the match.Just as switching from one broadcaster to another changes commentary style but not the underlying match, switching between Linux distributions changes shell defaults and package manager but not the kernel. Just as Star Sports and Sony Six both cover the same IPL match with different graphics packages, Ubuntu and Alpine both run the same kernel with different userspace tools.The insight is that these layers are genuinely separate, which is why you can swap any one of them independently.
Lesson 5 of 40
0% complete