Creating a Directory Structure in Linux

Get Started
30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

A Linux system administrator needs to know how to create files and folders on a computer. This exercise will assist you in creating a new directory structure, and adding new files to this structure.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Create the ‘Projects’ Parent Directories

Create the first parent directory structure with the mkdir command, and use the -p switch:

mkdir -p Projects/ancient
mkdir Projects/classical
mkdir Projects/medieval

or

mkdir -p Projects/{ancient,classical,medieval}
Create the ‘Projects’ Subdirectories

Create the subdirectory structure:

mkdir Projects/ancient/egyptian
mkdir Projects/ancient/nubian
mkdir Projects/classical/greek
mkdir Projects/medieval/britain
mkdir Projects/medieval/japan

or

mkdir Projects/ancient/{egyptian,nubian}
mkdir Projects/classical/greek
mkdir Projects/medieval/{britain,japan}
Create ‘Projects’ Empty Files for Next Step

Create the empty files for later use:

touch Projects/ancient/nubian/further_research.txt
touch Projects/classical/greek/further_research.txt
Rename a ‘Projects’ Subdirectory

The user would like for the classical directory to be renamed to greco-roman.

mv Projects/classical Projects/greco-roman

Additional Resources

You are responsible for handing a workstation with a specified directory structure to a new user. This user is a historian and will need to keep notes on various research topics separated into eras of time. Within the user's home directory, a new folder called 'Projects' needs to exist with the following subfolders: ancient, classical, and medieval. Under the ancient directory, two more directories must exist: egyptian and nubian. Within the classical directory, a folder named greek must exist. Within the medieval directory, two more directories need to be created: britain and japan.

A new, empty file named further_research.txt should be in the nubian and greek directories.

At the last moment, the classical directory needs to be renamed to greco-roman

Once these tasks are done, hand the system over to your team member for verification.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Get Started
Who’s going to be learning?

How many seats do you need?

  • $499 USD per seat per year
  • Billed Annually
  • Renews in 12 months

Ready to accelerate learning?

For over 25 licenses, a member of our sales team will walk you through a custom tailored solution for your business.


$2,495.00

Checkout
Sign In
Welcome Back!
Thanks for reaching out!

You’ll hear from us shortly. In the meantime, why not check out what our customers have to say about ACG?