Navigating Directories Flashcards
Command for present working directory
pwd
What does / mean
This is the path separator . When writing out files paths, different folders are separated by a /
Command to list contents of current directory
ls
What do the following options do for working with current directory:
- l
- a
- h
- l shows folder details
- a shows a files and folders (including hidden files and folders)
- h show folder size
What do the following mean:
.
..
. Current directory
.. Parent directory
.files are invisible config files
When looking at details of folder you’ll see at the start:
drwx——+
some times instead of the d, you might see a l or -. What do they mean
d is a directory
- is a file
l is a shortcut/link
How do we change our current working directory
cd
How do we get to parent directory
cd ..
When writing a path what would a / at the start symbolise e.g. /Users/guystapleton
the first slash means the root directory (top most folder). Indicates an absolute path (go here)
what does cd ~ do
It moves us into our current users folder
How do we move to previous directory
cd -
How do we move to previous directory
cd -