Understanding Linux Directories Fort Collins, CO Copyright © XTR Systems, LLC Understanding the...

22
Understanding Linux Directories Fort Collins, CO Copyright © XTR Systems, LLC Understanding the Linux Directory Structure Instructor: Joseph DiVerdi, Ph.D., MBA

Transcript of Understanding Linux Directories Fort Collins, CO Copyright © XTR Systems, LLC Understanding the...

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Understandingthe Linux

Directory Structure

Instructor: Joseph DiVerdi, Ph.D., MBA

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Why Bother with this Topic?

• In this class you will create a public web site– Remotely-Hosted on a Linux Server– Running Apache Web Server Software

• This is a very popular configuration & easy to learn

• If you understand the underlying principles– It will seem less like an exercise in memorization– You will be more effective with the available tools– Your future web site(s) will be more maintainable– You will be a happier person

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Linux Directory Structure

• There are two entities:– directories (called "folders" in a desktop OS)– files

• Files can exist within directories• Directories can exist within directories• Directories cannot exist within files

• Organized as an upside-down tree– root is at the top– Branches increase down the tree

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Schematic Directory

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Linux Directory Structure

• We often speak of parent & children directories

• The root directory has no parent directory• Every other directory has exactly one parent

directory– Just "above" it on the directory tree

• Every directory has zero or more child directories– Just "below" it on the directory tree

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Schematic Directory

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Schematic Directory

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Directory Paths

• A path is a specification which identifies a unique directory– Used when it is necessary to locate a particular file

or directory on a host

• There are two kinds of paths:– absolute path

• Information supplied is unambiguous & self-contained– 12245 JFK Parkway

– relative path• Information is relative to the entity which is declaring it

– Two blocks north & one block east

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Absolute Directory Path

• Must begin with a "/"

/users/jen/pers• Read: "slash-users-slash-jen-slash-pers"• Always starts with root directory

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Absolute Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Absolute Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Absolute Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path

• Must not begin with a "/"

users/jen/pers• Read: "users-slash-jen-slash-pers"• Must be considered relative to the current

directory

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path

• What if we wish to move "up" in the directory tree?

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path

Understanding Linux DirectoriesFort Collins, CO

Copyright © XTR Systems, LLC

Relative Directory Path