File & Directory Management – Linux Teaching Plan

This lesson introduces the essential Linux commands for navigating, creating, modifying, and cleaning up files and directories. It is designed for a 3‑hour workshop (or a 1‑hour introductory class) and includes hands‑on exercises that reinforce learning.

Course Overview

Materials

Lesson Plan Outline

Time Activity
0‑15 min Welcome & agenda overview
15‑30 min Basic navigation (pwd, cd, ls)
30‑45 min Creating & removing directories (mkdir, rmdir)
45‑60 min File creation, deletion, and moving (touch, rm, cp, mv)
60‑75 min Permissions & ownership (chmod, chown)
75‑90 min Searching & disk usage (find, du, df)
90‑105 min Practice session – guided exercises
105‑120 min Q&A & wrap‑up

Command Topics & Hands‑On Examples

1. pwd – Print Working Directory

Shows the absolute path of the current directory.

pwd
/Users/student/Documents/Labs/Linux

2. ls – List Directory Contents

Displays files and directories in the current location.

ls
README.md   scripts   logs

Common options

ls -l
drwxr-xr-x  3 student staff  96 Aug 12 09:30 scripts
-rw-r--r--  1 student staff  45 Aug 11 12:00 README.md

3. cd – Change Directory

Moves between directories.

cd /var/log
cd ../home
cd ~
cd -

4. mkdir – Make Directory

Creates new directories.

mkdir newdir
mkdir -p parent/child/grandchild
mkdir -m 755 secure

5. rmdir – Remove Empty Directory

Deletes an empty directory.

rmdir emptydir
rmdir -p nested/empty/dir

6. rm – Remove Files & Directories

Deletes files or recursively removes directories.

rm file.txt
rm -i file.txt
rm -r dir
rm -f /tmp/unwanted.log

7. touch – Create or Update File Timestamps

Creates an empty file or updates its last-modified time.

touch newfile.txt
touch -a oldfile.txt
touch -m -t 202309301200 newfile.txt

8. cp – Copy Files & Directories

Copies files or directories, optionally preserving attributes.

cp source.txt dest.txt
cp -r src_dir/ dest_dir/
cp -p file1 file2

9. mv – Move or Rename

Moves files or directories, or renames them.

mv oldname.txt newname.txt
mv file.txt /tmp/
mv -i existing.txt newfile.txt

10. chmod – Change File Permissions

Alters read/write/execute permissions using numeric or symbolic modes.

chmod 644 file.txt
chmod u=rwx,g=rx,o=r file.txt
chmod -R 755 /var/www/html

11. chown – Change File Owner & Group

Assigns a new owner or group to files or directories.

chown alice file.txt
chown alice:staff file.txt
chown -R bob:developers /home/bob/projects

12. find – Search for Files & Directories

Searches based on name, type, size, modification time, etc.

find . -name "*.log"
find /var -type d -name "conf.d"
find /tmp -size +1M -exec rm {} \;
find . -mtime -7 -print

Assessment & Reflection

Additional Resources

Feel free to adapt this plan to fit your learners’ pace and your institution’s schedule. Happy teaching!