UNIX File System Fundamentals

CT-152
Introduction to UNIX
Overview

Master essential UNIX/Linux file system navigation and command-line operations through interactive simulations. You'll develop practical skills in directory manipulation, file operations, and system administration fundamentals using hands-on terminal exercises and competency-based assessments.

Module Facts

Format: Interactive terminal + filesystem visualization

Assessment: Hands-on challenges + knowledge check

Duration: 12-15 minutes (practical focus)

Core Competencies
  • Filesystem Navigation: Navigate UNIX directory hierarchy using absolute and relative paths with confidence
  • Command Execution: Execute essential commands (pwd, ls, cd, mkdir, touch, rm) for file and directory manipulation
  • I/O Operations: Implement input/output redirection and pipe operations for complex data processing tasks
  • Permission Management: Configure file permissions using chmod and validate changes for security compliance
  • Documentation Skills: Utilize built-in help systems (man, --help) for independent command research

Filesystem Visualizer

UNIX Tree Click folders to expand/collapse. Hover to preview path.

Concept: Everything lives under the root directory /. User homes are typically in /home (Linux) or /Users (macOS). Paths beginning with / are absolute; paths without it are relative to your current working directory.

Absolute:   /home/student/projects
Relative:   projects    (if you are already in /home/student)
Tilde:      ~/projects  (shorthand for your home directory)
        
Practice in Terminal
This is a simplified, interactive view. The Terminal (below) uses a separate simulated filesystem to grade challenges.

Hands‑On Laboratory: Interactive Terminal Simulation

Laboratory Objectives

This interactive simulation provides a safe environment to practice UNIX commands without risk to actual systems. Complete the guided challenges to demonstrate competency in essential command-line operations.

Safety Note: This is a simulated environment. All commands executed here are contained within the browser and will not affect your computer system.

/bin/sh - student@ct152
student@ct152:~$

Getting Started

Try these commands: pwd, ls, cd projects, mkdir scripts, touch hello.sh, echo "hi" > hello.txt, cat hello.txt, ls -l, chmod u+x run.sh, man ls, help

Laboratory Challenges

Complete these tasks in sequence. Each challenge builds upon previous skills.

  1. Challenge 1: Directory Creation
    Create a directory named workbench inside the ~/projects directory.
    Skills: Directory navigation, mkdir command
    Hint: Use mkdir command
  2. Challenge 2: File Creation with Content
    Navigate to ~/projects/workbench and create a file named notes.txt containing the text "UNIX!"
    Skills: File creation, output redirection
    Hint: Use echo command with redirection (>)
  3. Challenge 3: Command Chaining
    Count the number of files in the ~/projects directory using pipe operations.
    Skills: Command piping, text processing
    Hint: Combine ls with wc -l using pipes (|)
  4. Challenge 4: Permission Management
    Make the script run.sh executable for the user and verify the change using ls -l.
    Skills: Permission modification, verification commands
    Hint: Use chmod u+x to add execute permissions

Interactive Command Construction

Exercise Purpose

This drag-and-drop exercise helps you understand command structure and syntax by constructing valid UNIX commands from individual components. Practice building commands before executing them in the terminal.

Instructions: Drag the command tokens below into the drop zone to construct a complete command, then click "Execute" to see simulated output.

Command Components

Drag these elements to build your command:

ls -l -a /home/student | grep .sh > out.txt

Command Construction Area

Drop command components here to build your command...

Command Output

(command output will appear here after execution)

Learning Tip: Try building commands like ls -l | grep .sh or ls -a > out.txt to practice combining operations.

Assessment: Knowledge Check

Assessment Instructions

Purpose: This assessment evaluates your understanding of core UNIX filesystem concepts and command-line operations covered in this module.

Format: Multiple choice questions (5 items)

Passing Score: 80% (4 out of 5 correct)

Instructions: Select the best answer for each question. Feedback is provided immediately upon selection.

Assessment Items

  1. Question 1: Filesystem Path Analysis
    Which of the following represents an absolute path in the UNIX filesystem?
  2. Question 2: File Permission Management
    What is the correct interpretation of the command chmod u+x script.sh?
  3. Question 3: Command Chaining and Pipes
    Which command correctly uses pipes to count the number of items listed by ls?
  4. Question 4: Documentation and Help Systems
    Where would a system administrator find comprehensive documentation for the grep command on a UNIX system?
  5. Question 5: Directory Navigation Commands
    Which command displays the current working directory path?

Assessment Results

Complete all questions to receive your final score.

Module Summary & Reflection

Key Concepts Mastered

  • Filesystem Navigation: Absolute vs. relative paths
  • Command Structure: Input → Command → Output paradigm
  • File Operations: Creation, modification, and removal
  • Permission Management: Security through access control
  • Documentation Skills: Self-directed learning with man

Professional Skills Developed

  • System administration fundamentals
  • Command-line proficiency
  • Problem-solving with built-in tools
  • Security-conscious file management
  • Technical documentation utilization

Reflection Questions

Consider how the skills learned in this module apply to your future coursework and career:

  • How might command-line skills enhance your productivity in software development?
  • What role does file permission management play in cybersecurity?
  • How can proficiency with documentation tools support lifelong learning?

Next Steps in Your Learning Journey

Recommended follow-up topics:

  • Advanced File Operations: Search with grep -R, archiving with tar
  • Process Management: Background jobs, process monitoring with ps
  • System Administration: User management, scheduled tasks with cron
  • Scripting: Shell scripting fundamentals and automation

Assessment Completion