CS155: Introduction to Unix

Fall 2017

File System

See this page as a slide show

Where are we?

“Where are we?”   “Loveland.”
“Where’s that?”   “Colorado.”
“Where’s that?”   “The USA.”
“Where’s that?”   “Earth.”
“Where’s that?”   “The Solar System.”
“Where’s that?”   “The Milky Way.”
“Where’s that?”   “You’re not from around here, are you?”

Let’s try that again.

“Where are we?”
“Loveland, Colorado, USA, Earth, Solar System, Milky Way.”

“I wanted it in the other order.”
“Milky Way, Solar System, Earth, USA, Colorado, Loveland.”

As a Unix path:

Or …

What if you’re not dealing with an idiot? Then you only need to specify as much as you need.

English: “I’m from Loveland, Colorado.”

Linux: Colorado/Loveland

Note that Colorado/Loveland did not start with a slash.

File System Basics


A pathname, or path is the “route” to a file or directory. How long is a route? It depends where you are, relative to the target.

Navigating the File System

% pwd
% cd /s
% pwd
% ls
bach  chopin  parsons  preisner

The Structure of a Unix Command

Options can modify behavior.


% ls
bach  chopin  parsons
% ls -F
bach/ chopin/ parsons/
% ls chopin
a k
% ls -l chopin
total 8
drwxr-xr-x  5 root root 4096 Jan 17 02:01 a
drwxr-xr-x  5 root root 4096 Jan 17 02:16 k

Also, there’s ll (that’s ell-ell, not eleven), which is same as ls -l. It’s a non-portable alias, which we will discuss later.

Home Directories

Modified: 2017-08-17T15:34

User: Guest

Edit History Source
Apply to CSU | Contact CSU | Disclaimer | Equal Opportunity
Colorado State University, Fort Collins, CO 80523 USA
© 2015 Colorado State University
CS Building