CH8: Working with directories Flashcards

1
Q

pwd

A

The tool displays your current directory.

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

cd

A

You can change your current directory with the cd command

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

cd~

A

will put you in your home directory

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

cd ..

A

go to the parent directory

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

cd .

A

To stay in the current directory

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

cd -

A

go to the previous directory

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

absolute and relative paths

A

You should be aware of absolute and relative paths in the file tree. When you type a path starting with a slash (/), then the root of the file tree is assumed. If you don’t start your path with a slash, then the current directory is the assumed starting point.

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

$PS1

A

can be configured to show the current directory in the prompt.

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

ls

A

to list the content of the current directory

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

ls -a

A

Showing all files including the hidden files.

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

what is a hidden file in linux

A

it is considered a hidden file and it doesn’t show up in regular file listings

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

ls -l

A

ls -l (that is a letter L, not the number 1) gives you a long listing.

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

ls -lh

A

shows the numbers (file sizes) in a more human readable format

total 56K
total 56K
drwxr-xr-x 1 aomaf aomaf 4.0K Mar 4 20:12 myepicproject
drwxr-xr-x 1 aomaf aomaf 4.0K Mar 4 19:59 node_modules
-rw-r–r– 1 aomaf aomaf 53K Mar 4 19:59 package-lock.json
-rw-r–r– 1 aomaf aomaf 101 Mar 4 19:59 package.json
drwxr-xr-x 1 aomaf aomaf 4.0K Jun 27 20:41 ransomware
drwxr-xr-x 1 aomaf aomaf 4.0K Mar 4 17:53 solana
drwxr-xr-x 1 aomaf aomaf 4.0K Mar 4 17:51 test-ledger
-rw——- 1 aomaf aomaf 98 Jun 27 20:50 voldamort.py.save

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

mkdir

A

Create a directory

-
mkdir stuff

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

mkdir -p

A

cerate parent directory as needed

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

rmdir

A

remove empty direcory

17
Q

rmdir -p

A

recursively remove directories.

And similar to the mkdir -p option