Practical Tasks - UD06
These tasks provide practical experience with file systems, commands, and file management.File System Navigation
Task 1: Basic File Commands
Exercise 1: Path Understanding
Exercise 1: Path Understanding
Objective: Understand absolute and relative paths
- What does
cd ..do in both Linux and Windows? - Describe in your own words:
- What is an absolute path?
- What is a relative path?
- Give examples of each
Exercise 2: Command Equivalents
Exercise 2: Command Equivalents
Objective: Learn equivalent commands across systemsComplete the table:
| Windows (PowerShell) | Linux (Bash) | Description |
|---|---|---|
Get-Content | View file contents | |
mkdir | Create directory | |
Get-ChildItem -Force C:\ | List all files including hidden | |
touch ficheroVacio.txt | Create empty file | |
Copy-Item -Path C:\asir -Destination C:\copiaAsir | Copy directory | |
rm -rf /asir/carpetaABorrar | Delete directory recursively | |
Rename-Item C:\asir\prueba.txt -NewName prueba2.txt | Rename file |
Exercise 3: mkdir Options
Exercise 3: mkdir Options
Objective: Understand command optionsExplain why this command doesn’t fail:Hint: What does the
-p option do?Task 2: Script Translation
Exercise 1: File Deletion Script
Exercise 1: File Deletion Script
Objective: Translate PowerShell to BASHConvert this PowerShell script to BASH:Your BASH script:
Exercise 2: File Copy Script
Exercise 2: File Copy Script
Objective: Translate PowerShell to BASHConvert this PowerShell script to BASH:Your BASH script:
Exercise 3: File Rename Script
Exercise 3: File Rename Script
Objective: Translate PowerShell to BASHConvert this PowerShell script to BASH:Your BASH script:
Hint: Use parameter expansion
${variable//search/replace} or sed commandLinux File Operations
Task 3: Using find Command
Exercise: Explain find Commands
Exercise: Explain find Commands
Objective: Understand the find commandDescribe what each find command does:Research:
- What does
-inamedo? - What’s the difference between
-nameand-iname? - What is
-type fvs-type l? - What does
-mtime +31mean? - Why is command #8 dangerous?
Task 4: File Information
Exercise: file Command
Exercise: file Command
Objective: Find PowerShell equivalentThe Linux Task:
file command shows file type information:- Research and find a PowerShell cmdlet with similar functionality
- Demonstrate with examples
- Compare the outputs
Windows File System
Task 5: Drive Letter Management
Exercise: subst Command
Exercise: subst Command
Objective: Understand drive mappingExplain what happens when you run:Questions:
- What appears in File Explorer?
- What is M:\ pointing to?
- What are practical uses for this?
- How do you remove the mapping?
- Is the mapping permanent?
Advanced File System Tasks
Task 6: File System Exploration
Windows Exercise
Windows Exercise
Objective: Explore Windows directory structure
Document System Directories
Create a table of important Windows directories:
| Directory | Purpose | Example Contents | Can Delete? |
|---|---|---|---|
| C:\Windows | |||
| C:\Program Files | |||
| C:\Users | |||
| C:\ProgramData | |||
| C:\Windows\System32 |
Linux Exercise
Linux Exercise
Task 7: Links and Shortcuts
Windows: Creating Links
Windows: Creating Links
Linux: Creating Links
Linux: Creating Links
Objective: Create symbolic and hard links in Linux
Experiment and Document
- Create a file with content
- Create both symbolic and hard links to it
- Modify original - check links
- Delete original - check links
- Document behavior differences
Comprehensive Challenges
Task 8: 11 de Febrero - Ada Lovelace Day
This is a comprehensive exercise combining file systems, permissions, and automation.Challenge Description
Challenge Description
Scenario: Create a tribute to Ada Lovelace with an automated file system structure.Requirements:
Populate with Content
- Download or create relevant content
- Organize into appropriate folders
- Include text files with information
Task 9: File System Partition Project
Research and Document
Research and Document
Objective: Understand partitioning and formattingResearch:
- What is a partition?
- Difference between MBR and GPT
- File system format comparison:
- NTFS vs FAT32 vs exFAT (Windows)
- ext4 vs xfs vs btrfs (Linux)
- Create virtual disk in VirtualBox/VMware
- Partition the disk
- Format with different file systems
- Compare performance and features
- Document everything
Task 10: System Cleanup Automation
Windows Cleanup Script
Windows Cleanup Script
Objective: Automate cleanup of temporary filesCreate PowerShell script that:
- Cleans Windows temp folder
- Cleans user temp folder
- Cleans browser caches
- Removes old log files
- Empties Recycle Bin
- Reports space freed
- Logs all actions
Linux Cleanup Script
Linux Cleanup Script
Objective: Automate cleanup of temporary filesCreate BASH script that:
- Cleans /tmp (preserving system files)
- Cleans package manager cache
- Removes old log files from /var/log
- Finds and reports large files
- Identifies old files in /home
- Reports space freed
- Logs all actions
Submission Guidelines
What to Submit:
- All scripts in ZIP file:
UD06_Tasks_YourName.zip - Completed tables and documentation
- Screenshots where requested
- README.md explaining:
- How to run each script
- What each script does
- Test results
- Challenges encountered
- Include comments
- Error handling
- Clear output messages
- Tested and working
Grading Criteria
| Criteria | Points |
|---|---|
| Command understanding | 25% |
| Script functionality | 30% |
| Cross-platform knowledge | 20% |
| Documentation quality | 15% |
| Advanced features | 10% |
Additional Resources
Windows Docs
Microsoft documentation on file systems and PowerShell commands
Linux Man Pages
man hier - File system hierarchy descriptionFHS Standard
Filesystem Hierarchy Standard documentation
Bash Guide
Advanced Bash-Scripting Guide for file operations