Command Line Basics
Joel Ross
IMT 511
Where are we?
pwd
(print working directory)
What's here?
ls
(list contents)
Change Location
cd folder
(change directory)
argument (required)
command
Paths
/absolute/path/to/file
relative/path/to/file
How to get there starting from the root
How to get there starting from here
leading slash
Path Symbols
.
(a period):
the current directory
..
(two periods):
the parent directory
Path Practice
# if I start here:
$ pwd
/Users/iguest/Desktop
# and then do this:
$ cd ../Desktop/lectures/.././../
#where do I end up?
# if I start here:
$ pwd
/Users/iguest/Desktop
# and then do this:
$ cd /../Desktop
#where do I end up?
ALWAYS USE RELATIVE PATHS IN CODE!
Display Text
echo "message"
(echo text back)
When in doubt:
ctrl-c (control and c)
to cancel!
imt511-command-line-basics
By Joel Ross
imt511-command-line-basics
- 523