Week 1 - Advanced Linux and Scripting
**Advanced Linux**
- Filesystem hierarchy: Linux organizes files in a tree-like structure starting with the root directory
(/).
Key directories include /bin (binary files), /etc (configuration files), /var (variable data), and /home
(user directories).
- Permissions: Permissions define who can read, write, or execute a file. Use `chmod` to change
permissions.
- System monitoring: Commands like `top` and `htop` show active processes, while `iostat`
monitors disk performance.
**Shell Scripting**
- Shell scripting automates repetitive tasks. Example:
```bash
# A simple script to display disk usage
#!/bin/bash
echo "Disk usage:"
df -h
```
- Common tools: `awk` processes text files, `grep` searches patterns, and `sed` edits streams of
text.
**Python for DevOps**
- Automate with Python. Example: A script to list running processes.
```python
import os
processes = os.popen('ps aux').read()
print(processes)
```