“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?”
“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:
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.”
Colorado/Loveland did not start with a slash.
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.
.(dot) means the current directory
..(dot dot) means the parent directory
% pwd /s/chopin/k/grad/nate % cd /s % pwd /s % ls bach chopin parsons preisner
pwd: print working directory
ls: list directory
cd: change directory
more: view a file
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
lsas an example
-l: use a long listing format
-S: sort by file size
/after directories, and
ll (that’s ell-ell, not eleven), which is same as
ls -l. It’s a non-portable alias, which we will discuss later.