Moving Around the File System Print

  • 0

Finding your way.

WHAT THE STRUCTURE IS

A single tree starting at the root, written as a forward slash.

WHAT THERE IS NO CONCEPT OF

Drive letters.

WHAT THE KEY DIRECTORIES ARE

Home directories for users Configuration, under etc Programs, under bin and sbin Variable data and logs, under var Temporary files, under tmp

WHAT pwd DOES

Prints where you currently are.

WHAT cd DOES

Changes directory.

WHAT cd WITH NO ARGUMENT DOES

Returns to your home directory.

WHAT THE SHORTCUTS ARE

A single dot means here Two dots mean the directory above A tilde means your home directory A dash returns to where you were last

WHAT ls DOES

Lists what is in a directory.

WHAT THE USEFUL OPTIONS ARE

Long format, showing permissions, owner, size and date All files, including hidden ones Human-readable sizes Sorted by time

WHAT A HIDDEN FILE IS

One whose name begins with a dot.

WHY THEY MATTER

Most configuration lives in them.

WHAT AN ABSOLUTE PATH IS

One starting from the root.

WHAT A RELATIVE PATH IS

One starting from where you are.

WHAT TO PREFER IN SCRIPTS

Absolute paths, since the working directory may not be what you expect.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot