Check and Compare File System Types
📖 Scenario: You are managing a Linux server and want to check the file system types of different mounted drives. Knowing the file system type helps you understand how data is stored and managed on each drive.
🎯 Goal: Build a simple script that lists mounted drives and shows their file system types, then filters to show only drives with ext4 or xfs file systems.
📋 What You'll Learn
Create a variable with a sample list of mounted drives and their file system types.
Add a variable to specify which file system types to filter (ext4 and xfs).
Use a loop or comprehension to select only drives with the specified file system types.
Print the filtered list showing drive names and their file system types.
💡 Why This Matters
🌍 Real World
System administrators often need to check and manage file system types on servers to ensure compatibility and performance.
💼 Career
Knowing how to script file system checks helps in automating server maintenance and troubleshooting tasks.
Progress0 / 4 steps