Navigating Directories Flashcards

1
Q

Command for present working directory

A

pwd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does / mean

A

This is the path separator . When writing out files paths, different folders are separated by a /

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Command to list contents of current directory

A

ls

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do the following options do for working with current directory:

  • l
  • a
  • h
A
  • l shows folder details
  • a shows a files and folders (including hidden files and folders)
  • h show folder size
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What do the following mean:
.
..

A

. Current directory
.. Parent directory

.files are invisible config files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

d is a directory
- is a file
l is a shortcut/link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How do we change our current working directory

A

cd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How do we get to parent directory

A

cd ..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When writing a path what would a / at the start symbolise e.g. /Users/guystapleton

A

the first slash means the root directory (top most folder). Indicates an absolute path (go here)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what does cd ~ do

A

It moves us into our current users folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How do we move to previous directory

A

cd -

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How do we move to previous directory

A

cd -

How well did you know this?
1
Not at all
2
3
4
5
Perfectly