🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Data Center Technician › Linux Basics for Data Center Technicians › Lesson 2
TEC-DATA82-07 · Lesson 2 · 14 clock hours · lab

Command-Line Navigation and File-System Management

Objective. Students will navigate the Linux directory hierarchy and create, copy, move, rename, and delete files and directories using at least ten core commands with correct syntax and no data-loss errors.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

Why the Command Line Matters in a Data Center

Data center servers almost never have a graphical desktop. You manage them through a text-based interface called the command-line interface (CLI). Speed, precision, and the ability to automate tasks through scripts make the CLI the standard tool for data center technicians. CompTIA A+ Core 2 and CompTIA Server+ both test Linux command knowledge, and the CNet CDCTP program expects you to work confidently in a Linux terminal from day one.

The Linux Filesystem Hierarchy Standard (FHS)

Linux organizes all files in a single tree that starts at the root directory, written as `/`. Every drive, partition, and network share is attached (mounted) somewhere inside that tree. The Filesystem Hierarchy Standard (FHS) defines where specific types of files live:

| Directory | Purpose |

|-----------|--------|

| `/bin` | Essential user command binaries (ls, cp, mv) |

| `/etc` | System-wide configuration files |

| `/home` | Personal directories for regular users |

| `/var` | Variable data: logs, mail, print spools |

| `/tmp` | Temporary files; often cleared on reboot |

| `/proc` | Virtual filesystem exposing kernel and process info |

| `/usr` | Secondary hierarchy: programs, libraries, documentation |

Knowing FHS lets you find log files quickly (`/var/log`), locate configuration files (`/etc`), and avoid touching directories that the OS relies on.

The Ten Core Navigation and File-Management Commands

1. `pwd` — Print Working Directory

Shows your current location in the filesystem tree. Always run `pwd` first when you open a new terminal session to confirm where you are.

2. `ls` — List Directory Contents

`ls -l` gives a long listing with permissions, owner, size, and modification date. `ls -la` also shows hidden files (names beginning with `.`).

3. `cd` — Change Directory

Move through the tree: `cd /var/log` goes to an absolute path; `cd ..` moves up one level; `cd ~` returns to your home directory.

4. `mkdir` — Make Directory

`mkdir reports` creates a subdirectory in the current location. `mkdir -p archive/2024/q1` creates nested directories in one step.

5. `touch` — Create an Empty File or Update Timestamps

`touch server_health.log` creates an empty file if it does not exist, or updates its timestamp if it does.

6. `cp` — Copy Files or Directories

`cp file.txt backup/file.txt` copies a file. Use `cp -r sourcedir/ destdir/` to copy a directory and all its contents recursively.

7. `mv` — Move or Rename

`mv oldname.log newname.log` renames a file in place. `mv file.log /var/log/app/` moves it to another directory. There is no undo for `mv` at the CLI, so verify the destination before pressing Enter.

8. `rm` — Remove Files or Directories

`rm file.log` deletes a file permanently. `rm -r directoryname/` removes a directory and all its contents. `rm -rf /` or any accidental recursive delete on a production path can destroy a live system — always double-check your path. Never run `rm -rf` as root unless you are absolutely certain of the target.

9. `find` — Search the Filesystem

`find /var/log -name "*.log" -mtime -7` finds all `.log` files in `/var/log` modified in the last seven days. `find` is essential for locating misplaced files during troubleshooting.

10. `tree` — Display Directory Tree

`tree /etc` prints a visual hierarchy. If `tree` is not installed, `tree` can be added with the system package manager. Use it to quickly understand an unfamiliar directory layout.

Absolute vs. Relative Paths

An absolute path starts from root: `/home/student/logs/app.log`. A relative path starts from your current directory: `logs/app.log` (if you are already in `/home/student`). Mixing these up is the most common source of copy or move errors.

Safety Considerations at the CLI

Documenting Your Work

A professional technician records every command and its output. In this course you will use a lab log notebook for that purpose. Good documentation supports troubleshooting, compliance audits, and knowledge transfer to teammates — all expectations in a production data center.

Key terms8

Filesystem Hierarchy Standard (FHS)A standard that defines the directory structure and directory contents in Linux and Unix-like operating systems, specifying where specific types of files must be stored.
Root directoryThe top-level directory of the Linux filesystem tree, represented by a single forward slash (/), from which all other directories branch.
Absolute pathA file or directory location specified from the root directory, always beginning with /, that is valid regardless of the user's current working directory.
Relative pathA file or directory location specified in relation to the user's current working directory, without a leading slash.
Recursive flag (-r or -R)A command option that instructs a command such as cp or rm to process a directory and all of its contents, including subdirectories.
Standard input/output (stdin/stdout)The default data streams in Linux: stdin is keyboard input, stdout is terminal output; CLI commands read from stdin and write results to stdout unless redirected.
Working directoryThe directory in which the user or process is currently operating, displayed by the pwd command.
GNU coreutilsThe collection of basic file, shell, and text manipulation utilities provided by the GNU project, including ls, cp, mv, rm, mkdir, and touch, that are standard on nearly all Linux systems.
In class: Guided lab: students follow a printed command sequence (pwd, ls, cd, mkdir, touch, cp, mv, rm, find, tree) on a dedicated practice partition, recording each command and its output in a lab log; instructor circulates and checks syntax in real time. · Timed file-system scavenger hunt: instructor pre-populates a server directory tree with misnamed log files; students must locate, rename, and move each file to the correct path within 20 minutes using only the CLI, no tab-complete allowed on the first pass. · Filesystem Hierarchy Standard (FHS) mapping exercise: students draw and label /bin, /etc, /home, /var, /tmp, /proc, and /usr on a whiteboard diagram, then verify each path on a live server and annotate what they find.
Materials: Lab servers with a practice partition; printed command reference card (GNU coreutils); CompTIA A+ Core 2 Exam Objectives (current version, Domain: Operating Systems); whiteboard and markers; lab log notebooks.
Check: Instructor reviews the lab log for all ten commands executed with correct syntax and expected output; scavenger hunt graded on accuracy of final file placement. Pass mark: 9 of 10 commands documented correctly and all scavenger-hunt files in correct locations (90% accuracy).

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

CompTIA A+ Core 2 — Operating Systems (Linux command-line tools)
1. A technician opens a terminal on a Linux server and is unsure of their current location in the directory tree. Which command should they run first?
CompTIA A+ Core 2 — Operating Systems (Linux command-line tools)
2. Which command will create the nested directory path /home/student/projects/2024/q1 in a single step, even if none of the intermediate directories exist yet?
CompTIA Server+ — Server Administration (Linux administration)
3. A technician wants to locate all files with the .log extension inside /var/log that were modified within the last three days. Which command achieves this?
CompTIA A+ Core 2 — Operating Systems (Linux filesystem)
4. Which directory in the Filesystem Hierarchy Standard is the correct location for system-wide configuration files such as network settings and service configuration?
CompTIA Server+ — Server Administration (data integrity and safety)
5. A technician runs: rm -r /var/log/app/. What is the most important safety check to perform before pressing Enter?
CompTIA A+ Core 2 — Operating Systems (Linux command-line tools)
6. After copying a directory tree with cp -r sourcedir/ destdir/, a technician needs to confirm the structure was reproduced correctly. Which command provides a visual hierarchy of destdir/?
CompTIA A+ Core 2 — Operating Systems (Linux command-line tools)
7. A student is in /home/student and wants to move the file report.txt from that directory into /var/log/app/ and rename it to final_report.txt in the same operation. Which command is correct?
CNet CDCTP — Data Center Operations (Linux server fundamentals)
8. According to the Filesystem Hierarchy Standard, which directory stores variable data such as application log files that grow over time?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.